一、首先下载Windows下的源程序打包文件:http://www.rpmcenter.org/win32/
该压缩包内已包含编译好,可以直接使用的mod_auth_mysql.so文件,也可以参照里面的HOWTO.Win32.txt来自己编译:
BUILDING mod_auth_mysql for Win32
=================================
Assume you are using Visual Studio 6.0 (should be similar for Visual Studio.net/2003/2005):
1. Download Apache2 2.0.55 win32 source file from one of the apache mirror, for example:
http://www.apache.org/dist/httpd/httpd-2.0.55-win32-src.zip
* You should avoid using the main site, select from a mirror from http://httpd.apache.org
2. Extract the Apache2 2.0.55 win32 source file to a location you like (for example C:/)
- 说明:由于我们已经安装了MySQL,4、5步可以不需要了。
- 4. Since MySQL5 is no longer compiled with VS6.0, you need to build mysql win32 from source also:
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.15-win-src.zip/from/pick - 5. Extract MySQL source and Build All
8. Build mod_auth_mysql.so(Build菜单下满选择Set active configuration,选择mod_auth_mysql -Win32 release)
Enjoy!
CONFIGURING mod_auth_mysql for Win32
====================================
Please read CONFIGURE.txt for more information
二、将mod_auth_mysql.so拷贝到Apache2的安装目录的modual目录下
三、修改httpd.conf:
Can't locate API module structure `auth_mysql_module' in file E:/Apache2/modules
/mod_auth_mysql.so: No error
2、在SVN的认证区,修改如下:
<Location /svn>
DAV svn
#SVNListParentPath on
SVNParentPath e:/svn
AuthzSVNAccessFile e:/ca/access/file
#try anonymous access first,resort to real
#authentication if necessary.
#Satisfy Any
Require valid-user #所有错作需要认证
#how to authenticate a user
AuthType Basic
AuthName "Check ID:" #弹出认证窗口的描述字符串
# AuthUserFile e:/ca/access/svn-auth-file
AuthMySQLHost localhost #这里直接借用Bugfree的用户验证表
AuthMySQLUser Bugfree #mysql的用户,必须要有操作密码表的权限
AuthMySQLPassword XXXX #该用户的密码
AuthMySQLDB BugFree #保存用户密码的数据库名字
AuthMySQLUserTable BugUser #保存用户密码的表格
AuthMySQLNameField UserName
AuthMySQLPasswordField UserPassword
# AuthMySQLMD5Passwords On #新的版本已经不支持这种用法,而使用下面一种用法
AuthMySQLPwEncryption md5 #none | crypt | scrambled | md5 | aes | sha1
</Location>