Prerequisites:
- See Use Cloud LDAP to obtain the JumpCloud specific settings required below.
This process was qualified on 01/25/2017 with Ubuntu 16.04 and Server version: Apache/2.4.18 (Ubuntu). The scope of this article provides proof of concept for basic LDAP authentication only. For additional items like enabling SSL, group authentication, etc., please see Apache documentation.
- Enable the module:
# a2enmod ldap authnz_ldap
Enabling module ldap.
Considering dependency ldap for authnz_ldap:
Module ldap already enabled
Enabling module authnz_ldap.
To activate the new configuration, you need to run:
service apache2 restart
- Create a new site configuration in /etc/apache2/sites-available/ldap.conf:
<Directory /var/www/html/ldap>
AuthName "LDAP Auth Test"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPBindDN uid=LDAP_BINDING_USER,ou=Users,o=YOUR_ORG_ID,dc=jumpcloud,dc=com
AuthLDAPBindPassword LDAP_BINDING_USER_PASSWORD
AuthLDAPURL ldaps://ldap.jumpcloud.com:636/ou=Users,o=YOUR_ORG_ID,dc=jumpcloud,dc=com #Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
AuthLDAPBindAuthoritative off
Require valid-user
</Directory>
- Create the site directory and enable the site:
# mkdir /var/www/html/ldap
# a2ensite ldap
Enabling site ldap.
To activate the new configuration, you need to run:
service apache2 reload
# service apache2 reload
- Create a test page and check for required authentication by visiting the page:
echo "Hello World" > /var/www/html/ldap/index.html
Back to Top