Apache 中可以通过mod_authz_ldap 模块为LDAP 提供了良好的的支持。
(1)安装Aache 支持LDAP 身份验证的模块
#yum –y install mod_authz_ldap
(2) 编辑/etc/httpd/conf.d/authz_ladp.conf 文件,在<IFModule mod_authz_ldap.c>语句下增加一下内容(假设:/var/phpmyadmin 目录存放的网站使用LDAP身份验证)。
<Directory /var/phpmyadmin>
AuthzLDAPServer 192.168.2.100
AuthzLDAPUserBase ou=People,dc=example,dc=com
AuthzLDAPUserKey uid
AuthzLDAPUserScope base
AuthType basic
AuthName “This is Test LDAP Auth”
Require valid-user
</Directory>
推荐阅读:
RedHat6下构建LDAP服务 http://www.linuxidc.com/Linux/2013-05/84741.htm
Linux 使用pam_LDAP通过ad域认证 http://www.linuxidc.com/Linux/2012-09/71043.htm
Zimbra故障——Unable to determine enabled services from LDAP http://www.linuxidc.com/Linux/2012-07/66869.htm
