红联Linux门户
Linux帮助

CentOS为Apache使用LDAP身份验证

发布时间:2015-04-21 15:29:59来源:linux网站作者:jin771998569

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>