1) 如果没有的话,那么下载apache源码,编译下
cd /httpd-2.2.19/modules/aaa/
/usr/local/apache/bin/apxs -c -i -a mod_authn_alias.c
2)编译好后,会自动生成 modules/mod_authn_alias.so并且修改httpd.conf加载这个so.
3)修改httpd.conf如下
------------
<AuthnProviderAlias ldap domain1>
AuthLDAPBindDN "user1@domain1.com"
AuthLDAPBindPassword abcd1234
AuthLDAPURL ldap://10.192.176.20:3268/DC=domain1,DC=com?sAMAccountName?sub?(objectClass=*)
</AuthnProviderAlias>
<AuthnProviderAlias ldap domain2>
AuthLDAPURL "ldap://10.192.240.10:3268/DC=domain2,DC=com?sAMAccountName?sub?(objectClass=*)" NONE
AuthLDAPBindDN "user2@domain2.com"
AuthLDAPBindPassword abcd123456
</AuthnProviderAlias>
<Location "/svn/"> #后面加上/可以增加跟目录浏览功能,甚是方便
DAV svn
SVNParentPath /svnroot/repos
SVNListParentPath On
AuthzSVNAccessFile /svnroot/conf/authz
AuthUserFile "/usr/local/apache/conf/passwdfile"
AuthBasicProvider domain1 domain2
AuthType Basic
AuthzLDAPAuthoritative on
Require valid-user
AuthName "SVN Server"
</Location>
4)重启动apache,一切OK.
好处:支持多个Windows AD服务器,某种程度上讲比Visual SVN Server还要好用。使用Visual SVN Server某些版本,首先服务器本身必须加入到某个LDAP Server,这个是比较不合理的。而且Visual SVN 也不支持多个域。
这个文章更全
http://blog.csdn.net/zhoufoxcn/article/details/73312662