0

I have followed this guide https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-centos-7 in order to install nagios in my centos 7.8 system

installation went through without problem, however i'm having issues when accessing the GUI

Nagios page opens up after i specify the credentials set with htpasswd however on the right side of the iframe i get:

The requested URL /nagios/< was not found on this server.

there's no error in the error logs and in the access logs i can see:

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"

As you can see from these logs there's a 404 error for file

/nagios/%3C?php%20echo%20$url;%20?%3E

the same file shows up in the browser console log i've run out of ideas, any clues?

  • 1
    This guide doesn't mention installing PHP so i would verify that first. – tbielaszewski Oct 12 at 11:12
  • @tbielaszewski Php is installed and running as this is my development server and there are a few domains running php – Meni Oct 12 at 11:14
1

Error is related to php not installed or Nagios cannot find it , please check link as below : https://support.nagios.com/forum/viewtopic.php?f=7&t=7740&sid=52943b6873de070610f51bd5228d211d&start=10

| improve this answer | |
  • Thanks mate, that pointed me in the right direction. – Meni Oct 14 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.