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


问题: 页面提示没有权限.......
It appears as though you do not have permissionto view information for any of the hosts you requested...
似乎你没有权限查看任何你要求的主机信息…


解决办法:

1、修改/etc/cgi.cfg

vi     /usr / local /nagios /etc /cgi.cfg
use_authentication = 1 #把 1修改为 0,保存
[root@bairui212 ~]# service nagios restart    重启服务

再次访问就能正常访问了.这种修改后安全性差了,不推荐

2、 还记得我们装nagios时生成的一个管理员帐号吗

htpasswd ‐ c /usr / local /nagios /etc /htpasswd.users david
nagiosadmin是我们用来登录nagios的管理员,而cgi.cfg就是用来验证管理员身份的!
如果你生成的管理员用户不是nagiosadmin,验证的时候就会失败,也就会出现开始我们描述的那个错误了!!
所以,我们现在只要把配置文件里的用户名改为实际的管理员用户名,保存,再重新启动nagios即可!

vi /usr / local /nagios /etc /cgi.cfg

将以下的几项中的nagiosadmin改为你实际的用户名即可,其实也可以在后面加上你的用户名,与前面用逗号隔开

authorized_for_system_information =nagiosadmin,david
authorized_for_configuration_information =nagiosadmin,david
authorized_for_system_commands =nagiosadmin,david
authorized_for_all_services =nagiosadmin,david
authorized_for_all_hosts =nagiosadmin,david
authorized_for_all_service_commands =nagiosadmin,david
authorized_for_all_host_commands =nagiosadmin,david

你可能感兴趣的:(nagios,页面提示没有权限)