一、首先下载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:/)
3. Copy httpd-2.0.55 directory in this zip file to the location you extracted Apache2 (ie. C:/)
说明:此处我是把解压出来的mod_auth_mysql目录(mod_auth_mysql-3.0.0-for-Win32-mysql5.0.15-and-apache2.0.55/httpd-2.0.55/mod_auth_mysql)直接剪切下来,放到apache源代码目录的modual目录(apache/httpd-2.0.55/modules)
说明:由于我们已经安装了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
6. Open Apache dsw and add mod_auth_mysql Project
说明:VS6的Project菜单下选择insert projects into workspace,然后选择我们拷贝到Apache目录的dsp文件:/apache/httpd-2.0.55/modules/mod_auth_mysql/mod_auth_mysql.dsp
7. Specify the mysql include and lib locations in your Visual Studio environment
此处可以直接使用安装好的MySQL的Lib目录(E:/MySQL/lib/opt)和include目录(E:/MySQL/include)
在VS6的Tools/Options/Directorys/include选项下面添加:E:/MySQL/include
在VS6的Tools/Options/Directorys/Lib选项下面添加:E:/MySQL/lib/opt
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:
1、在LoadModule段的末尾,增加装载模块的语句:
LoadModule mysql_auth_module modules/mod_auth_mysql.so
注意这里模块的名字是mysql_auth_module,写错了就会报错。
如果名字写成 "auth_mysql_module" ,就会出现以下错误信息:
Syntax error on line 181 of E:/Apache2/conf/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>
分享到:
相关推荐
mod_auth_mysql-3.0.0.tar.gz
用源码编译生成的Apache的扩展模块,可进行MySQL数据库认证。使用:放到modules下,在conf文件中加入 LoadModule mysql_auth_module modules/mod_auth_mysql.so重启服务即可
Apache+SVN 域认证时需要的so及exe文件
mod_auth_sspi-1.0.2-2.0.54.zip mod_auth_sspi-1.0.2-2.0.54.zip
在mod_auth_mysql.c的目录中执行: patch -p0 < apache22.diff
用于squid mysql 验证的软件 这样squid的帐户就可以放到mysql了
google_auth-1.23.0-py2.py3-none-any.whl python 包 google_auth-1.23.0-py2.py3-none-any.whl python 包 google_auth-1.23.0-py2.py3-none-any.whl python 包google_auth-1.23.0-py2.py3-none-any.whl python 包 ...
官方离线安装包,测试可用。请使用rpm -ivh [rpm完整包名] 进行安装
wegame_auth.dll
2. Change "auth file" loading flow for security project, don't need re-select auth file after restart tool. 3. Update meta relate dll/head/lib files from META_DLL_Customer_exe_v9.1724.20.zip 4. Change...
我的mqtt协议和emqttd开源项目个人理解(14) - 使用redis插件来实现访问控制
资源来自pypi官网。 资源全名:pulumi_auth0-1.0.2.tar.gz
SQL Server JDBC Driver[sqljdbc.jar+sqljdbc_auth.dll] 很简洁,里面有sqljdbc.jar+sqljdbc_auth.dll(x86和64的都有),整理出来方便大家下载使用,不用积分。
请大家先不要下载这个资源 未上传完...
Aoache TACACS+ 认证模块,提供认证,授权,审计。使用C语言实现
LoadModule auth_basic_module modules/mod_auth_basic.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule cache_module modules/...
This is the kerberos module authentication implementation in C
mod_auth_certificate-0.3.tar-源码.rar
ali_phone_auth-2.12.0.1.aar
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装