易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 3767|回复: 3
收起左侧

nagios界面出现:It appears as though you do not have permission to view

[复制链接]
发表于 2017-12-14 11:53:54 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
Description: If you click on "View Config" and you get: """It appears as though you do not have permission to view the configuration information you requested... If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI and check the authorization options in your CGI configuration file."""
5 ?& y" V( s5 U4 V; {4 ?: x6 o/ u* i* j  O, X

( Y4 r( T% q& [2 }& a报错解决办法:
$ u8 j  c9 Z( t) @# v
& m+ l8 P, N- }( ~( ]8 C" H# k: r/ O+ g9 o) Z- y* f1 _
修改/usr/local/nagios/etc/cgi.cfg文件:! s2 W  y' A4 ?2 C# \
authorized_for_configuration_information" in cgi.cfg
' L8 q# U3 e3 b+ D5 oauthorized_for_configuration_information=nagiosadmin- B3 L+ c  p" g3 l( t" i. v

6 W$ v0 g/ w$ j! M* p9 O+ W: |/ z' t+ \# V& X" O( ^- q
其中nagiosadmin所有的配置 都替换成nagios/ y% m% q& I' Z# z4 n5 R8 I$ v

) G1 k( k  ~$ B4 P9 ?5 L5 b% n) a9 d' C8 ^5 b( {* |
修改为设置的用户;2 A( M0 P% c5 [% m  g/ z
本处认证的用户为nagios    修改实例如下:
7 Z, `5 |8 m' T0 ]1 {+ \: K9 Vauthorized_for_configuration_information=nagios
, f) h4 M) O% l重启httpd服务,重启nagios服务,问题解决。' ~" W3 T9 d+ Y2 b+ }( I7 O$ P
 楼主| 发表于 2017-12-14 11:54:48 | 显示全部楼层
还需要将cgi的文件由0修改为1;如下
$ r8 x1 J" Q$ Huse_authentication=1
 楼主| 发表于 2017-12-14 11:57:36 | 显示全部楼层
7 l! G7 C% }# C, o  L8 S8 |
也可以借鉴背的地方的方法:添加一个当前设置的认证用户* V3 N5 N' c" V0 b
edit /usr/local/nagios/etc/cgi.cfg5 E+ K$ W* X8 `4 q) T
1 a; P) Z: c  R" U  u
add username , without any space like this
& _! ]( L2 O7 l3 o3 ]$ j* W
8 [- p. Z& C7 [/ jauthorized_for_system_information=nagiosadmin,username,username2  ]# c3 N9 x1 t8 M, d( s
如下修改的本次的结果:5 @2 g* `) n2 M! u6 h' s
; E6 O. _& w1 e# N
authorized_for_system_information=nagiosadmin,nagios   ; F4 ?9 `4 M6 c! E
保存文档  重启nagios服务和httpd服务
5 j, q5 |1 I+ Q! [save file and restart nagios service using service nagios restart
 楼主| 发表于 2017-12-14 11:58:35 | 显示全部楼层
或者使用添加一个另外的认证方式,加入一个新的认证文件即可:
; f7 d: d5 \( xI have also faced the same issue and I solved running command* q$ m* v' D4 ~6 e. L& ?4 Z, _$ q

1 ?( e& c  y  W  W) R' v8 t. }2 Esudo htpasswd -b -c /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-9 01:06 , Processed in 0.049710 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表