Premature end of script headers: status.cgi, referer:

回复 收藏
搭建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
2011-06-29 19:50 举报
已邀请:

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: