|
Written by Bart Dorlandt
|
|
Thursday, 21 February 2008 17:38 |
|
To have a user authorize himself (via Active Directory) to access some directory you can use the following config.
This configuration has to be in /var/www/conf/httpd.conf or included into that file.
Packages needed to make this work:
mod_auth_ldap
Make sure you fill in the correct values. Everything between < > needs to be replaced.
<Directory /var/www/htdocs/<ldapaccess_directory>> Options All ExecCGI -Indexes Order allow,deny Allow from all Require valid-user # LDAP Authentication & Authorization is final; do not check other databases AuthLDAPAuthoritative on # Do basic password authentication in the clear AuthType Basic # The name of the protected area or "realm" AuthName "<realm>" # Active Directory requires an authenticating DN to access records AuthLDAPBindDN "cn=<Authentication user>,cn=<Users>,dc=<domain>,dc=<extensions>" # This is the password for the AuthLDAPBindDN user in Active Directory AuthLDAPBindPassword <password> # The LDAP query URL AuthLDAPURL ldap://<ip address>:<port default389>/cn=<Users>,dc=<domain>,dc=<extensions>?sAMAccountName?sub?(objectClass=*) </Directory>
Don't forget to restart apache |
|
Last Updated on Friday, 13 February 2009 15:27 |