wget http://mesh.dl.sourceforge.net/sourceforge/modauthmysql/mod_auth_mysql-2.9.0.tar.gz
tar xzfv mod_auth_mysql-2.9.0.tar.gz
cd mod_auth_mysql-2.9.0
/usr/local/apache/bin/apxs -c -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient -lm -lz mod_auth_mysql.c
/usr/local/apache/bin/apxs -i mod_auth_mysql.la
vi /usr/local/apache/conf/httpd.conf
添加:
LoadModule mysql_auth_module modules/mod_auth_mysql.so
<Directory "/www/client/awstats/cgi-bin">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
#/usr/local/apache/bin/apachectl restart
搞定。
tar xzfv mod_auth_mysql-2.9.0.tar.gz
cd mod_auth_mysql-2.9.0
/usr/local/apache/bin/apxs -c -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient -lm -lz mod_auth_mysql.c
/usr/local/apache/bin/apxs -i mod_auth_mysql.la
vi /usr/local/apache/conf/httpd.conf
添加:
LoadModule mysql_auth_module modules/mod_auth_mysql.so
<Directory "/www/client/awstats/cgi-bin">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
引用
.htaccess
AuthName "请输入访问相册的帐号密码:"
AuthType Basic
AuthUserFile /www/client/awstats/cgi-bin/.htpasswd
AuthType Basic
AuthName "请输入访问统计的帐号密码:"
AuthMySQLHost localhost
AuthMySQLPort 3306
AuthMySQLDB FTPdb
AuthMySQLUser FTPUSER
AuthMySQLPassword dfg5345345345756
AuthMySQLPwEncryption md5
AuthMySQLEnable On
AuthMySQLUserTable ftpd
AuthMySQLNameField User
AuthMySQLPasswordField Password
Require valid-user
AuthName "请输入访问相册的帐号密码:"
AuthType Basic
AuthUserFile /www/client/awstats/cgi-bin/.htpasswd
AuthType Basic
AuthName "请输入访问统计的帐号密码:"
AuthMySQLHost localhost
AuthMySQLPort 3306
AuthMySQLDB FTPdb
AuthMySQLUser FTPUSER
AuthMySQLPassword dfg5345345345756
AuthMySQLPwEncryption md5
AuthMySQLEnable On
AuthMySQLUserTable ftpd
AuthMySQLNameField User
AuthMySQLPasswordField Password
Require valid-user
#/usr/local/apache/bin/apachectl restart
搞定。