I'm trying to setup an Apache web server that only allows access to users that are in an LDAP store. I am able to setup exactly what I want on my local Windows 7 machine using Apache 2.2.21 against the LDAP server. After trying to login through the prompt, the Linux version displays a 500 error page.
To setup the Apache on CentOS I ran the below commands:
yum install httpd mod_ssl mod_authz_ldap
I made sure that
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
were both uncommented in /etc/httpd/conf/httpd.conf.
My <Directory/> is the same between my Windows and Linux httpd.conf (except for the DocumentRoot of course)
AuthName "Login with email address"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL ldap://ldap.sample.org:1389/ou=Users,dc=sample,dc=org?uid?sub
AuthLDAPBindDN "cn=Directory Manager"
AuthLDAPBindPassword ldappassword
Require valid-userOptions Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
(note: our LDAP server is serving on port 1389.)
The /var/log/httpd/error_log from Apache on the Linux machine shows:
[Fri Dec 23 08:17:20 2011] [warn] [client 192.168.1.113] [8181] auth_ldap authenticate: user foo authentication failed; URI / [LDAP: ldap_simple_bind_s() failed][Can't contact LDAP server]
I can telnet to the LDAP port from both the Windows and Linux machines. As I mentioned before, the Windows version is working exactly as expected.
One thing I did notice between the Windows version and the Linux version of Apache httpd.conf is the Linux version has almost all the modules enabled by default while the Windows version has most of them commented out which leads me to believe that there could possibly be a module conflict.
Does anyone have any ideas?
Thanks!