我正在为我的/var/svn目录设置LDAPS身份validation。
这里是我对Apache的configuration文件:
LDAPTrustedGlobalCert CERT_BASE64 /etc/openldap/cacerts/Cert.pem <VirtualHost *:80> ServerName myserver.com DocumentRoot /var/www <Location /svn> DAV svn SVNParentPath /var/svn AuthType Basic AuthBasicProvider ldap AuthLDAPBindDN "mybind_dn" AuthLDAPBindPassword "mypassword" AuthLDAPURL "ldaps://my_ldap_server:636/credentials" AuthName "Authorized Personnel Only" Require valid-user </Locaion> </VirtualHost>
当我尝试访问“myserver.com/svn”时,出现“内部服务器错误”(500),在错误日志中什么也没有显示。 我知道LDAPS正在操作系统级别工作(我有一个testing脚本来证实这一点),所以我真的很茫然。
有任何想法吗?
编辑:如果我省略LDAP身份validation,只使用基本身份validation(使用.htpasswd文件),它工作得很好。
事实certificate,这是一个“特殊情况”的问题,但我会张贴我的调查结果,以帮助其他人有类似的问题。
这源于我的LDAP服务器有一个无效的安全证书。 因为Apache不知道如何处理“错误”的证书,所以它惊慌失措,放弃了一切。 要强制apache忽略错误的证书,请在httpd.conf文件中放置以下行:
LDAPVerifyServerCert off
这样做,快速的Apache重新启动给了我一直在寻找的结果。