Httpd and LDAP Authentication not working for sub-pages

Posted by DavisTasar on Server Fault See other posts from Server Fault or by DavisTasar
Published on 2013-10-21T18:58:47Z Indexed on 2013/10/21 21:55 UTC
Read the original article Hit count: 200

Filed under:
|
|
|

I just recently installed a Nagios implementation, and I'm trying to get LDAP authentication working for httpd on Red Hat. (nagios.conf for Apache config below, sanitized of course)

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#SSLRequireSSL
Options ExecCGI
AllowOverride none
AuthType Basic
AuthName "LDAP Authentication"
AuthLDAPURL "ldap://my.domain.controller:389/OU=Users,DC=my,DC=domain,DC=controller?sAMAccountName?sub?(objectClass=user)" NONE
AuthzLDAPAuthoritative off
AuthLDAPBindDN "CN=NagiosAdmin,DC=my,DC=domain,DC=controller"
AuthLDAPBindPassword "myPassword"
require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory /usr/local/nagios/share>
#SSLRequireSSL
Options None
AllowOverride none
AuthBasicProvider ldap
AuthType Basic
AuthName "LDAP Authentication"
AuthzLDAPAuthoritative off
AuthLDAPURL "ldap://my.domain.controller:389/OU=Users,DC=my,DC=domain,DC=controller?sAMAccountName?sub?(objectClass=user)" NONE
AuthLDAPBindDN "CN=NagiosAdmin,DC=my,DC=domain,DC=controller"
AuthLDAPBindPassword "myPassword"
require valid-user
</Directory>

Now, the initial authentication works, so when you first hit the page you can log in just fine. However, when you go anywhere else, it prompts you for authentication, fails (asking for a re-prompt), and gives this error message:

[Mon Oct 21 14:46:23 2013] [error] [client 172.28.9.30] access to /nagios/cgi-bin/statusmap.cgi failed, reason: verification of user id '<myuseraccount>' not configured, referer: http://<nagiosserver>/nagios/side.php

I'm almost certain its a simple flag or option, but I just can't find it, and I don't have a lot of experience working with Apache. Any assistance or help would be greatly appreciated.

© Server Fault or respective owner

Related posts about linux

Related posts about redhat