Linux

訪問 Nagios 時未發現錯誤

  • October 12, 2020

我已按照本指南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

引用自:https://serverfault.com/questions/1037345