Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When i try to login to Nagios in my web browser and after having repeatedly enter my login and password on my Nagios page, 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 Port 80

I changed the password :

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

And restart the server :

service httpd restart

But without result !

share|improve this question
What does the Apache error log say? Show us your configuration for Nagios /etc/httpd/conf.d/nagios.conf? – quanta Sep 10 '12 at 2:28
This is the configuration for Nagios : – M. Saâd Sep 10 '12 at 2:34
And this is the Apache's error.log : – M. Saâd Sep 10 '12 at 2:46
user nagiosadmin: authentication failure for "/nagios/": Password Mismatch. – quanta Sep 10 '12 at 2:47
up vote 2 down vote accepted
<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

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

share|improve this answer

Ensure that apache's user can read /etc/nagios/htpasswd.users:

If your apache user is www-data, then:

$ sudo chown www-data /etc/nagios/htpasswd.users
$ sudo chmod 600 /etc/nagios/htpasswd.users
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.