New Centos install The requested URL /nagios/status.cgi was

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
borrierulez
Posts: 24
Joined: Wed Mar 16, 2016 4:59 am

New Centos install The requested URL /nagios/status.cgi was

Post by borrierulez »

Hey everyone,

I've set up Nagios a few years ago and now in my new company i'm installing it again.

I've installed it on CENTOS, followed all tutorials but when i click on map i get 'not found' The requested URL /nagios/status.cgi was not found on this server.

I verified that the status.cgi file is in the usr/local/nagios/sbin folder.

And this is my httpd conf file:

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
"


Does anyone know what the problem could be?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: New Centos install The requested URL /nagios/status.cgi

Post by rkennedy »

What version of Centos did you install Core onto? Also, what guide did you follow?

I wrote these instructions for Centos 7 - https://assets.nagios.com/downloads/nag ... entos7.pdf which should cover everything.

As for Centos 6, we have these instructions available https://support.nagios.com/kb/article.p ... ategory=58
Former Nagios Employee
borrierulez
Posts: 24
Joined: Wed Mar 16, 2016 4:59 am

Re: New Centos install The requested URL /nagios/status.cgi

Post by borrierulez »

Well, it's on centos 7, i just did it without open ssl, followed about the same guide, did the install twice, twice the same problem, something todo with the alias or permissions i think, been trying stuff for days but can't get it to work :(

*Edit

I want to try fan but i see the last iso is from 2013n do you know some preconfigured iso's with nagvis and centreon preïnstalled?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: New Centos install The requested URL /nagios/status.cgi

Post by rkennedy »

borrierulez wrote:Well, it's on centos 7, i just did it without open ssl, followed about the same guide, did the install twice, twice the same problem, something todo with the alias or permissions i think, been trying stuff for days but can't get it to work :(

*Edit

I want to try fan but i see the last iso is from 2013n do you know some preconfigured iso's with nagvis and centreon preïnstalled?
Can you try following the guide above? While another one might be similar, they aren't the same. It's important to check getenforce to see if you're enforcing SELinux or not.

We have Nagios XI available for download as a OVA. It's a 60 day trial, or a free license for up to 7 hosts is available as well.
https://www.nagios.com/downloads/nagios-xi/
Former Nagios Employee
borrierulez
Posts: 24
Joined: Wed Mar 16, 2016 4:59 am

Re: New Centos install The requested URL /nagios/status.cgi

Post by borrierulez »

I did the install exactly that way, everything works except for the status map (legacy map works)
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: New Centos install The requested URL /nagios/status.cgi

Post by rkennedy »

Got it - thanks for clarifying.

What are the permissions of the files in this folder?

Code: Select all

ls -l /usr/local/nagios/sbin
Also, what happens if you navigate to this page manually?
http://yourip/nagios/map.html?host=all
Former Nagios Employee
borrierulez
Posts: 24
Joined: Wed Mar 16, 2016 4:59 am

Re: New Centos install The requested URL /nagios/status.cgi

Post by borrierulez »

on the map link: i get an empty page, i can configure on the right stuff like: url for json cgi's, it's set to : http://ipaddress/nagios/cgi-bin/

ls output:

Code: Select all

-rwxrwxrwx 1 nagios nagios 316456 Mar 15 13:01 archivejson.cgi
-rwxrwxrwx 1 nagios nagios 297752 Mar 15 13:01 avail.cgi
-rwxrwxrwx 1 nagios nagios 296176 Mar 15 13:01 cmd.cgi
-rwxrwxrwx 1 nagios nagios 264904 Mar 15 13:01 config.cgi
-rwxrwxrwx 1 nagios nagios 310008 Mar 15 13:01 extinfo.cgi
-rwxrwxrwx 1 nagios nagios 260992 Mar 15 13:01 histogram.cgi
-rwxrwxrwx 1 nagios nagios 240376 Mar 15 13:01 history.cgi
-rwxrwxrwx 1 nagios nagios 240360 Mar 15 13:01 notifications.cgi
-rwxrwxrwx 1 nagios nagios 318248 Mar 15 13:01 objectjson.cgi
-rwxrwxrwx 1 nagios nagios 236224 Mar 15 13:01 outages.cgi
-rwxrwxrwx 1 nagios nagios 236240 Mar 15 13:01 showlog.cgi
-rwxrwxrwx 1 nagios nagios 310024 Mar 15 13:01 status.cgi
-rwxrwxrwx 1 nagios nagios 312296 Mar 15 13:01 statusjson.cgi
-rwxrwxrwx 1 nagios nagios 261056 Mar 15 13:01 statusmap.cgi
-rwxrwxrwx 1 nagios nagios 252688 Mar 15 13:01 statuswml.cgi
-rwxrwxrwx 1 nagios nagios 240368 Mar 15 13:01 statuswrl.cgi
-rwxrwxrwx 1 nagios nagios 260896 Mar 15 13:01 summary.cgi
-rwxrwxrwx 1 nagios nagios 252704 Mar 15 13:01 tac.cgi
-rwxrwxrwx 1 nagios nagios 269184 Mar 15 13:01 trends.cgi
*EDIT

When i go to the http://ipaddress/nagios/cgi-bin i get a You don't have permission to access /nagios/cgi-bin/ on this server.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: New Centos install The requested URL /nagios/status.cgi

Post by lmiltchev »

Can you run the following commands and show the output?

Code: Select all

grep nag /etc/passwd
grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
borrierulez
Posts: 24
Joined: Wed Mar 16, 2016 4:59 am

Re: New Centos install The requested URL /nagios/status.cgi

Post by borrierulez »

systemd-network:x:998:996:systemd Network Management:/:/sbin/nologin
nagios:x:1001:1001::/home/nagios:/bin/bash


nagios:x:1001:
nagcmd:x:1002:nagios,apache
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: New Centos install The requested URL /nagios/status.cgi

Post by hsmith »

Can you add the users 'nagios' and 'apache' to the 'nagios' group, and see if this resolves anything?
Former Nagios Employee.
me.
Locked