我已按照本指南https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-centos-7在我的 centos 中安装 nagios 7.8 系统
安装没有问题,但是我在访问 GUI 时遇到问题
在我使用 htpasswd 指定凭据集后,Nagios 页面打开,但是在 iframe 的右侧我得到:
The requested URL /nagios/< was not found on this server.
错误日志和访问日志中没有错误,我可以看到:
10.0.1.36 - nagiosadmin [12/Oct/2020:13:15:03 +0300] "GET /nagios/ HTTP/1.1" 200 1933 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228"
10.0.1.36 - nagiosadmin [12/Oct/2020:13:15:03 +0300] "GET /nagios/side.php HTTP/1.1" 200 6193 "http://10.0.0.101/nagios/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228"
10.0.1.36 - nagiosadmin [12/Oct/2020:13:15:03 +0300] "GET /nagios/%3C?php%20echo%20$url;%20?%3E HTTP/1.1" 404 209 "http://10.0.0.101/nagios/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228"
10.0.1.36 - nagiosadmin [12/Oct/2020:13:15:03 +0300] "GET /nagios/images/sblogo.png HTTP/1.1" 200 3231 "http://10.0.0.101/nagios/side.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228"
10.0.1.36 - nagiosadmin [12/Oct/2020:13:15:03 +0300] "GET /nagios/stylesheets/common.css?%3C?php%20echo%20$this_version;%20?%3E HTTP/1.1" 200 10166 "http://10.0.0.101/nagios/side.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228"
10.0.1.36 - nagiosadmin [12/Oct/2020:13:15:03 +0300] "GET /nagios/images/favicon.ico HTTP/1.1" 200 822 "http://10.0.0.101/nagios/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228"
从这些日志中可以看出,文件存在 404 错误
/nagios/%3C?php%20echo%20$url;%20?%3E
浏览器控制台日志中显示相同的文件我已经没有想法了,有什么线索吗?
错误与 php 未安装或 Nagios 找不到有关,请查看以下链接: https ://support.nagios.com/forum/viewtopic.php?f=7&t=7740&sid=52943b6873de070610f51bd5228d211d&start=10