NagiosExchange
NagiosForge
NagiosWiki
Nagios Community Platform powered by NETWAYS

HowTos:BestPractice:ApacheLdapAuthentication

Search  
From NagiosWiki
Jump to: navigation, search

Apache2 LDAP Authentication

Requirement

Apache 2.2.x or higher

Configuration

Enable Apache Modules ldap_module and authnz_ldap_module

LoadModule ldap_module                    /usr/lib/apache2-prefork/mod_ldap.so
LoadModule authnz_ldap_module             /usr/lib/apache2-prefork/mod_authnz_ldap.so


Example: /etc/apache2/conf.d/nagios.conf

<Directory "/usr/local/nagios/sbin">
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from 192.168.0.0/255.255.0.0
   AuthName "Nagios Access"
   AuthType Basic
   AuthBasicProvider file ldap
   AuthzLDAPAuthoritative Off
   AuthLDAPBindDN cn=LDAPUser,CN=Users,DC=GER,DC=DOMAIN-FIRMA,DC=LOCAL
   AuthLDAPBindPassword USERPASSWORD
   AuthLDAPURL "ldap://LDAP-SERVER:389/OU=Firma Users,DC=GER,DC=DOMAIN-FIRMA,DC=LOCAL?sAMAccountName?sub?(objectClass=user)"
   AuthUserFile /usr/local/nagios/etc/htpasswd.user
   Require valid-user
</Directory>

Restart Apache2:

/etc/init.d/apache2 restart