how to configure httpd with ldap authentication

how to configure httpd with ldap authentication

httpd 2.4 ldap

LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
<VirtualHost *:*>
ProxyPass / http://elk-kibana:5601/
ProxyPassReverse / http://elk-kibana:5601/
<Proxy *>
Require all granted
# LDAPSharedCacheSize 500000
# LDAPCacheEntries 1024
# LDAPCacheTTL 600
# LDAPOpCacheEntries 1024
# LDAPOpCacheTTL 600
AuthType Basic
AuthName "Login with LDAP"
AuthBasicProvider ldap
AuthLDAPURL "ldap://<YOUR LDAP SERVER>:3268/OU=Offices,DC=company,DC=com?sAMAccountName?sub?(objectClass=person)"
AuthLDAPBindDN "CN=Operator,OU=Service Accounts,DC=company,DC=com"
AuthLDAPBindPassword <PUT Operator's PASSWORD HERE>
require valid-user
</Proxy>
</VirtualHost>

via:httpd.apache.org

mod_ldap
mod_authnz_ldap