Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed and configured nagios on CentOS using yum

I get "It appears as though you do not have permission to view information for any of the hosts you requested..." on the web interface.

I have created the passwd file and checked that nagiosadmin has the permissions in the cgi.cfg file.

However, on the web interface the page says "Logged in as $REDIRECT_REMOTE_USER=" even though I have logged in as nagiosadmin.

Any Ideas?

[EDIT] I have just compiled from source to no avail [/EDIT]

[EDIT2]

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

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>

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

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>

[/EDIT2] [EDIT3] After a bit of troubleshooting. apache is not setting REDIRECT_REMOTE_USER but sets the REMOTE_USER [/EDIT3]

share|improve this question
    
Looks like your webserver is mangling some data. Please add your webserver config to your question. –  Dennis Kaarsemaker Jul 11 '13 at 14:37

2 Answers 2

This REDIRECT_REMOTE_USER problem is a side-effect of running PHP via FastCGI (or as normal CGI), which is not going to work with the stock Nagios web interface.

You'll have to either switch to using the Apache module of PHP, or hack the PHP source to use the REDIRECT value.

share|improve this answer
up vote 0 down vote accepted

Setting REMOTE_USER to REDIRECT_REMOTE_USER in apache config seems to have done the trick

SetEnv REMOTE_USER REDIRECT_REMOTE_USER
share|improve this answer

Your Answer

 
discard

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.