当使用apache 2.4和LDAPauthentication时出现内部错误500

我有一个configurationSVN服务器的CentOS 7服务器,我有另一台带有LDAP的Windows服务器2012R2,用于域控制器。 我可以使用ldapsearch与Windows服务器通信。

那么我现在的问题是,当我尝试通过浏览器login到svn服务器,无论我input什么,它出现一个内部错误(500)。

这是我在/etc/httpd/conf.moudules.d/10-subversion.conf ldapconfiguration:

 Alias /svn /var/www <Location /> DAV svn SVNParentPath /var/www AuthType Basic LDAPReferrals Off AuthBasicAuthoritative on AuthBasicProvider ldap AuthName "SVN Server Login" AuthLDAPURL ldap://172.20.2.3:389/,dc=syd,dc=domain,dc=com?sAMAccountName?sub?(ObjectClass=*) NONE AuthLDAPBindDN syd\admin AuthLDAPBindPassword adminpassword Require valid-user </Location> 

我得到了这样的错误信息:

 [Thu May 12 09:55:02.382284 2016] [authnz_ldap:info] [pid 9720] [client 172.19.12.2:61673] AH01695: auth_ldap authenticate: user a.b1 authentication failed; URI /repo [ldap_search_ext_s() for user failed][Invalid DN syntax] 

任何帮助将不胜感激。 谢谢。

在你的AuthLDAPURL中的基础看起来是错误的,它在端口/斜杠后面有一个逗号:

 AuthLDAPURL ldap://172.20.2.3:389/,dc=syd,dc=domain,dc=com?sAMAccountName?sub?(ObjectClass=*) NONE 

改为:

 AuthLDAPURL ldap://172.20.2.3:389/dc=syd,dc=domain,dc=com?sAMAccountName?sub?(ObjectClass=*) NONE 

但是,真的,只需从Apache文档获取configuration

 AuthLDAPBindDN [email protected] AuthLDAPBindPassword password AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub 

你可以使用samaccountname而不是userPrincipalName,如果你喜欢你的用户只用login名而不是upnlogin。