Configure Apache Webserver to authenticate from LDAP Server

1. Connect to the LDAP Server from an LDAP Browser

ldap browser

ldap browser connected

2. Uncomment these two modules in httpd.conf

LoadModule ldap_module modules/
LoadModule authnz_ldap_module modules/

3. Add the following Location directive

<Location />

AuthType Basic
Require valid-user
AuthName   “Enter Your ldap Username/Password”
AuthBasicProvider   ldap
AuthzLDAPAuthoritative   off
AuthLDAPURL    ldap://localhost:444
AuthLDAPBindDN    “uid=faisal,ou=People, dc=bea,dc=com”
AuthLDAPBindPassword    faisal
ErrorDocument    401   “Please use your ldap username and password to login.”


4. Restart Apapche Webserver

5. Log in to the server with LDAP Credentials




login success

Leave a Reply