在搭建nagios监控服务器过程中,访问web页面时,点左侧的功能按钮总是报错:
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
查看apache的错误日志:
[Thu Jun 30 01:36:58 2011] [error] [client 10.0.4.84] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed, referer: http://10.0.4.88/nagios/side.html
[Thu Jun 30 01:36:58 2011] [error] [client 10.0.4.84] Premature end of script headers: status.cgi, referer: http://10.0.4.88/nagios/side.html
[Thu Jun 30 01:36:59 2011] [error] [client 10.0.4.84] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed, referer: http://10.0.4.88/nagios/side.html
[Thu Jun 30 01:36:59 2011] [error] [client 10.0.4.84] Premature end of script headers: status.cgi, referer: http://10.0.4.88/nagios/side.html
这是因为使用的apache是rpm包安装的缘故。解决办法,或者源码编译apache,或者重新编译nagios,指定 prefix=/var/www/nagios 当然连后边的nagios-plugin 也必须指定相应的目录了。我也试验把nagios编译到/var/www/nagios 总觉得哪里配置还是有点问题,所以不建议这样,建议重新编译源码的apache。
我是参考这篇文章来的 http://coolerfeng.blog.51cto.com/133059/47635
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
查看apache的错误日志:
[Thu Jun 30 01:36:58 2011] [error] [client 10.0.4.84] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed, referer: http://10.0.4.88/nagios/side.html
[Thu Jun 30 01:36:58 2011] [error] [client 10.0.4.84] Premature end of script headers: status.cgi, referer: http://10.0.4.88/nagios/side.html
[Thu Jun 30 01:36:59 2011] [error] [client 10.0.4.84] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed, referer: http://10.0.4.88/nagios/side.html
[Thu Jun 30 01:36:59 2011] [error] [client 10.0.4.84] Premature end of script headers: status.cgi, referer: http://10.0.4.88/nagios/side.html
这是因为使用的apache是rpm包安装的缘故。解决办法,或者源码编译apache,或者重新编译nagios,指定 prefix=/var/www/nagios 当然连后边的nagios-plugin 也必须指定相应的目录了。我也试验把nagios编译到/var/www/nagios 总觉得哪里配置还是有点问题,所以不建议这样,建议重新编译源码的apache。
我是参考这篇文章来的 http://coolerfeng.blog.51cto.com/133059/47635
编辑回复