3

我目前正在为我的 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>
4

1 回答 1

4

OpenLDAP 使用空白分隔的服务器列表。假设 mod_ldap 正在使用 OpenLDAP,这可能有效:

ldap://primary.server backup.server:389/searchstring

如果这不起作用,请尝试包含两个空格分隔的 URL:

ldap://primary.server:389/searchstring ldap://backup.server:389/searchstring

编辑:mod_authnz_ldap似乎正式支持这一点。

于 2008-11-03T21:29:06.080 回答