500内部服务器错误:这是什么问题?

我已经在我的服务器configuration了openldap,也安装和configuration了mod_ldap但是如果我介绍正确或者不正确的用户,服务器会抛出500 Internal Server Error

我不知道这是否是一个错误的OpenLDAP,mod_ldap,SSL证书/configuration,虚拟主机,或其他configuration的configuration。

我的mod_ldapconfiguration到VirtualHost中:

 <Directory /var/www/html/test> #SSLRequireSSL AuthName "LDAP Authentication" AuthType basic AuthBasicProvider ldap AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?sub?(objectClass=*) Require ldap-filter objectClass=posixAccount </Directory> 

我尝试在VirtualHosts外部添加LDAPVerifyServerCert Off ,但不起作用。 每次更改后我都会service httpd restart

我已经在当地testing,没有问题。 你知道这个问题吗?

重要编辑:

我已经检查了我的openldapconfiguration,并在testing时抛出一个错误:

  ldapsearch -x -b 'dc=mycompany,dc=com' 'objectclass=*' ldap_result: Can't contact LDAP server (-1) 

只适用于:

 ldapsearch -H ldapi:/// -x -b 'dc=mycompany,dc=com' 

编辑添加:

失败:

ldapsearch -h 127.0.0.1 -x -b '' -s base '(objectclass=*)' namingContexts

但与以下工作:

ldapsearch -H ldapi:/// -x -b '' -s base '(objectclass=*)' namingContexts

而现在我知道我不能ping通本地主机,可能是为了这个。

新版本:现在我可以ping一个本地主机,但问题仍然存在。

ldap日志:

  conn=1001 op=0 BIND dn="" method=128 conn=1001 op=0 RESULT tag=97 err=0 text= conn=1001 op=1 SRCH base="dc=example,dc=com" scope=2 deref=0 filter="(objectClass=*)" conn=1001 op=1 SEARCH RESULT tag=101 err=0 nentries=5 text= conn=1001 op=2 UNBIND conn=1001 fd=11 closed fd=11 DENIED from unknown (1xx.xxx.xxx.xxx) fd=11 DENIED from unknown (1xx.xxx.xxx.xxx) fd=11 DENIED from unknown (127.0.0.1) 

httpd日志:

 [mpm_prefork:notice] [pid 24034] AH00170: caught SIGWINCH, shutting down gracefully [suexec:notice] [pid 24185] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [ssl:warn] [pid 24185] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366) [so:warn] [pid 24185] AH01574: module proxy_module is already loaded, skipping [so:warn] [pid 24185] AH01574: module proxy_module is already loaded, skipping AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 2a01:4f8:100:136d::2. Set the 'ServerName' directive globally to suppress this message [auth_digest:notice] [pid 24185] AH01757: generating secret for digest authentication ... [lbmethod_heartbeat:notice] [pid 24185] AH02282: No slotmem from mod_heartmonitor [ssl:warn] [pid 24185] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366) [mpm_prefork:notice] [pid 24185] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16 configured -- resuming normal operations [core:notice] [pid 24185] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'