我目前正在为我的 Subversion 存储库使用 Apache 前端,以便进行 LDAP 身份验证。
我的设置相当普通,但是我希望能够指定一个“备份”LDAP URL,以防主 URL 出现故障。除了使用第二个位置或指向辅助 LDAP 服务器的虚拟主机之外,我目前看不到这样做的方法。
虽然这在技术上可行,但它不是最佳解决方案。我想要一些不需要用户手动选择备份 URL 的东西。
这目前是 CentOS 5 上的 Apache 2.2.3。
httpd.conf 中的示例条目:
<VirtualHost *:80>
ServerName svn.example.com
ServerAlias svn.example.com svn
<Location /erx>
DAV svn
SVNPath "/usr/local/svn/repos"
Require valid-user
AuthzSVNAccessFile "/usr/local/svn/conf/svnaccess.conf"
AuthName "SVN Repository"
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthLDAPURL "ldap://ldapserver:389/searchstring" NONE
AuthLDAPBindDN "bind"
AuthLDAPBindPassword password
</Location>
</VirtualHost>