Apache-2.4.x ldap认证 Apache-2.4.x ldap认证 官方网站: http://httpd.apache.org/docs/2.4/mod/mod_authnz_ldap.html 环境: CentOS 7 apache-2.4 openldap-2.4.44 ldap搭建请参看OpenLDAP 2.4.x源码安装配置 一.安装apache及ldap模块 yum -y install httpd mod_ldap 二.配置ldap认证 vi /etc/httpd/conf.d/ldap.conf 这里直接借用官方示例,其它认证选项请查看官方文档 Require ldap-user bjenson fuser jmanager Require ldap-group cn=Administrators, o=Example Require ldap-dn cn=Barbara Jenson, o=Example Require ldap-attribute city="San Jose" "status=active" Require ldap-filter "&(cell=*)(department=marketing)" 三.认证效果