访问 Nagios 时出现未找到错误

访问 Nagios 时出现未找到错误

我已经遵循本指南https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-centos-7为了在我的 centos 7.8 系统中安装 nagios

安装顺利完成,但我在访问 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

相同的文件出现在浏览器控制台日志中我已经没有主意了,有什么线索吗?

答案1

错误与 php 未安装或 Nagios 无法找到它有关,请检查以下链接: https://support.nagios.com/forum/viewtopic.php?f=7&t=7740&sid=52943b6873de070610f51bd5228d211d&start=10

相关内容