Google Plus

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

Written by Mel Kham on . Posted in News

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

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Snake

|

Wow, great. That’s what i’m waiting for too. I want to make DC with LDAP ( Active Directory alternative) and SAMBA on Ubuntu. :-)

Blawer

|

Thanks!!!!!!!!!!!!!!!!!! you rules!!! all the other “help” in google are useless… yours was very helpful. Thanks again

piCool

|

Great ! we have another another master trick :-)

Yilmaz Ulugtekin

|

Just delete the space after the slash (/) it will work.

Pat L

|

I tried it and it works with a regular zip file, but if you password-protect the .zip file it does NOT work.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .