OpenLDAP Should be installed priorly.
In Apache.conf file add the following lines :
LoadModule ldap_module <Path to mod_ldap.so>/mod_ldap.so
LoadModule authnz_ldap_module <Path to mod_authnz_ldap.so>/mod_authnz_ldap.so
<LocationMatch "/login">
AuthType Basic
AuthName "Testing"
AuthBasicProvider "ldap"
AuthLDAPURL "ldap://host:port/dc=example,dc=org?cn" #
AuthLDAPBindDN "cn=Manager,dc=example,,dc=org" #
AuthLDAPBindPassword "123" #
AuthzLDAPAuthoritative off
require valid-user
</LocationMatch>
Note: in # marked lines, put your server values.
In Apache.conf file add the following lines :
LoadModule ldap_module <Path to mod_ldap.so>/mod_ldap.so
LoadModule authnz_ldap_module <Path to mod_authnz_ldap.so>/mod_authnz_ldap.so
<LocationMatch "/login">
AuthType Basic
AuthName "Testing"
AuthBasicProvider "ldap"
AuthLDAPURL "ldap://host:port/dc=example,dc=org?cn" #
AuthLDAPBindDN "cn=Manager,dc=example,,dc=org" #
AuthLDAPBindPassword "123" #
AuthzLDAPAuthoritative off
require valid-user
</LocationMatch>
Note: in # marked lines, put your server values.
Restart Apache.
root@otc-desktop:~# /etc/init.d/apache2 reload
root@otc-desktop:~# /etc/init.d/apache2 reload