LDAP Authentication

Apache can be configured to authenticate users against an LDAP database, such as Open Directory, part of Apple's OS X Server.


yum install openldap-devel

To install LDAP authentication support in Apache, it must be configured with:

--with-ldap --enable-ldap --enable-authnz-ldap

NOTE: --with-ldap appears to be broken in Apache 2.2.9.
Might also need:

--with-ldap-include=/usr/local/include --with-ldap-lib=/usr/local/lib

Authenticate Against an OS X Open Directory server
Require a valid user:

AuthName "LDAP Test"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL ldap://<server>/cn=users,dc=domain,dc=com?uid
require valid-user

The user should be a member of a certain group:

AuthLDAPGroupAttribute memberUid
AuthLDAPGroupAttributeIsDN off
require ldap-group cn=<group>,cn=groups,dc=<domain>,dc=com

Recent Updates

  • 2 years 1 month ago
  • 2 years 1 month ago
  • 2 years 1 month ago
    php 8.x
  • 2 years 1 month ago
  • 2 years 1 month ago
    Drop Centos 5/6 stuff