Web Server

How to configure Active Directory authentication with Apache web server

apache web server Authentication through Active Directory or LDAP is convenient and makes it easier to manage users within an organization. Apache can also authenticate through AD. With just a few changes to its configuration files, you can manage access through AD. Configuring Apache to authenticate through Active Directory takes just three simple steps:

  1. Edit /etc/http/conf/httpd.conf and uncomment the following lines.

    LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  2. Add the following lines. Change Directory to the path containing your files, and adjust the LDAP authentication settings.

    
    ############## LDAP Authen #########################
    AuthBasicProvider ldap
    AuthType Basic
    AuthzLDAPAuthoritative on
    AuthName "Enter your LDAP username and Password"
    Require ldap-group CN=EzGroup,OU=GROUPS,DC=ezylinux,DC=com
    AuthLDAPURL "ldap://ldap.ezylinux.com/OU=Staff,DC=ezylinux,DC=com?SAMAccountName"
    AuthLDAPBindDN "CN=ldapsearch,OU=Corporate,DC=ezylinux,DC=com"
    AuthLDAPBindPassword "your-password"
    ################################################
    Options Indexes FollowSymLinks
    AllowOverride None
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  3. Restart Apache with this command.

    [root@Ezylinux ~]# service httpd graceful
EOF.← Back to articles