It appears as though you do not have permission to view information for any of the hosts you requested…

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0StumbleUpon0

How  to solve this   issue  when browsing  nagios page ?

 

 

It appears as though you do not have permission to view information for any of the hosts you requested…

Answer :

 

Solution:
1. edit cgi.cfg file
$ vi /opt/nagios/etc/cgi.cfg

use_authentication=1
#edit username
authorized_for_all_host_commands=username
authorized_for_all_hosts=username
authorized_for_all_service_commands=username
authorized_for_all_services=username
authorized_for_configuration_information=username
authorized_for_system_commands=username
authorized_for_system_information=username

2. edit nagios.conf file  in   apache cond  directory
$ vi /etc/apache2/conf.d/nagios.conf

 

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>

 

3. generate htpasswd.users file
$ htpasswd2 -c  /usr/local/nagios/etc/htpasswd.users  username

 

This  Solution Tested  and  workds

For questions please refer to our Q/A forum at : http://ask.unixmen.com/


Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0StumbleUpon0