Saturday, 14 May 2011

Linux Apache Directories With LDAP Authentication Setup.


Ldap Server              :
Ldap Server Port       : 3268
Organizational Units   : WEBUSERS
Admin User               :
webadmin Password : password

Step 1: Copy your project to /var/www/html directory.

"cp -R myproject /var/www/html/projectone"

Step 2: Give the project permission for Apache User.

"chmod 755 /var/www/html/projectone/* -R"
"chown apache:apache /var/www/html/projectone/* -R"

Step 3: Edit httpd.conf and enable ldap modules.

edit "/etc/httpd/conf/httpd.conf"

Enable the lines:
"LoadModule ldap_module modules/"
"LoadModule authnz_ldap_module modules/"

Step 4: Create ldap authentication settings for projectone directory.

edit "/etc/httpd/conf/httpd.conf"

Add line:

<Location /projectone/>
  AuthType Basic
  AuthName "ProjectOne"
  AuthBasicProvider "ldap"
  AuthLDAPBindPassword password
  authzldapauthoritative Off
  require valid-user
  require ldap-group CN=WEBUSERS,CN=Users,DC=domain,DC=mycompany,DC=com

Step 5: Restart Apache web server.

"service httpd restart"

Apache Ldap based directory access is ready.

No comments:

Post a Comment