Check /etc/httpd/conf/httpd.conf file:
# vi /etc/httpd/conf/httpd.conf # in the Dynamic Shared Pbject section, make sure you have: LoadModule ldap_module modules/mod_ldap.so LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
Then create a /etc/httpd/conf.d/auth.conf file with the following contents:
# vi /etc/httpd/conf.d/auth.conf <IfModule authnz_ldap_module> <Directory /var/www/html> AuthName "Authentication" AuthType Basic AuthBasicProvider ldap AuthLDAPURL ldap://server/ou=People,dc=company,dc=com?uid Require valid-user </Directory> </IfModule>
Make sure you do a apache service restart:
# /etc/rc.d/init.d/httpd restart
Now if you access servername/html folder, you need your LDAP account.
No comments:
Post a Comment