Redhat – I can’t log in to Nagios web interface

apache-2.2monitoringnagiosredhat

When i try to login to Nagios in my web browser and after having repeatedly enter my login and password on my Nagios page http://127.0.0.1/nagios/, i get this :

Authorization Required

This server could not verify that you are authorized to access the
document requested. Either you supplied the wrong credentials (e.g.,
bad password), or your browser doesn't understand how to supply the
credentials required. Apache/2.2.15 (Red Hat) Server at 127.0.0.1 Port
80

I changed the password :

htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

And restart the server :

service httpd restart

But without result !

Best Answer

<Directory "/usr/lib/nagios/cgi-bin/">
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/passwd
   Require valid-user
</Directory>

You have specified the wrong path for AuthUserFile: it should be /etc/nagios/htpasswd.users instead of /etc/nagios/htpasswd.