Apache 2.4冗余LDAPauthentication

我试图提供一个冗余的LDAP身份validation到我的networking服务器。

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin" <AuthnProviderAlias ldap ldap-one> AuthLDAPBindDN "search@domain" AuthLDAPBindPassword "pass" AuthLDAPURL "ldap://###.###.###.###/dc=domain,dc=local?sAMAccountName?sub" NONE </AuthnProviderAlias> <AuthnProviderAlias ldap ldap-two> AuthLDAPBindDN "search@domain" AuthLDAPBindPassword "pass" AuthLDAPURL "ldap://###.###.###.###/dc=domain,dc=local?sAMAccountName?sub" NONE </AuthnProviderAlias> <Directory "/usr/local/nagios/sbin"> Order deny,allow Allow from all AuthBasicProvider ldap-one ldap-two AuthType Basic AuthName "Authentication" Require valid-user </Directory> Alias /nagios "/usr/local/nagios/share" <Directory "/usr/local/nagios/share"> Order deny,allow Allow from all AuthBasicProvider ldap-one ldap-two AuthType Basic AuthName "Authentication" Require valid-user </Directory>` 

有用! 但是,这个问题的关键在于,无论出于何种原因,当ldap-one离线时,我仍然可以login。 所以,我把ldap-one的IP地址改成另一个不去任何地方的ip地址,然后重新加载。

现在,当我尝试login时,出现“内部服务器错误”。如果将AuthBasicProvider中的顺序切换为ldap-two ldap-one,则可以正常工作。

所以它看起来只是检查AuthBasicProvider的第一个条目。

这是我一直遵循的文档/示例: https : //httpd.apache.org/docs/2.2/mod/mod_authn_alias.html

信息:

 # httpd -v Server version: Apache/2.4.6 (CentOS) # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) 

非常感谢,

奥利