In my previous blog I showed you how to set up basic authentication via access file for a private directory. To do the same thing for LDAP, use this configuration instead.
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LDAPTrustedGlobalCert CA_BASE64 /etc/httpd/example-ca.crt
<Directory "/private">
AuthType Basic
AuthName "Restricted Resource"
AuthBasicProvider ldap
AuthLDAPUrl "ldap://ldap.example.com/dc=example,dc=com" TLS
Require valid-user
Order deny,allow
Deny from all
Allow from all
</Directory>
No comments:
Post a Comment