Can only access Nagios core homepage, all others fail

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.
Locked
c.slagel
Posts: 57
Joined: Mon Dec 17, 2012 6:47 pm

Can only access Nagios core homepage, all others fail

Post by c.slagel »

So I have installed Nagios Core on a fresh CentOS6 box. I can login and reach the homepage just fine, however when I click on ANY section of the sidebar (services, hosts, etc) I get an internal server error. HTTP error log reads as follows:

Code: Select all

[Fri Nov 14 21:54:25 2014] [error] [client 67.52.160.42] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed, referer: http://54.148.133.113/nagios/side.php
[Fri Nov 14 21:54:25 2014] [error] [client 67.52.160.42] Premature end of script headers: status.cgi, referer: http://54.148.133.113/nagios/side.php
Permissions on the directory however look fine:

Code: Select all

[root@ip-10-1-6-229 nagios]# pwd
/usr/local/nagios
[root@ip-10-1-6-229 nagios]# ll
total 28
drwxrwxr-x.  2 nagios nagios 4096 Nov 14 21:42 bin
drwxrwxr-x.  3 nagios nagios 4096 Nov 14 21:44 etc
drwxr-xr-x.  2 root   root   4096 Nov 14 21:46 include
drwxrwxr-x.  3 nagios nagios 4096 Nov 14 21:46 libexec
drwxrwxr-x.  2 nagios nagios 4096 Nov 14 21:42 sbin
drwxrwxr-x. 11 nagios nagios 4096 Nov 14 21:46 share
drwxrwxr-x.  5 nagios nagios 4096 Nov 14 21:56 var
[root@ip-10-1-6-229 nagios]# cd sbin/
[root@ip-10-1-6-229 sbin]# ll
total 4956
-rwxrwxr-x. 1 nagios nagios 304800 Nov 14 21:42 archivejson.cgi
-rwxrwxr-x. 1 nagios nagios 292104 Nov 14 21:42 avail.cgi
-rwxrwxr-x. 1 nagios nagios 287528 Nov 14 21:42 cmd.cgi
-rwxrwxr-x. 1 nagios nagios 259272 Nov 14 21:42 config.cgi
-rwxrwxr-x. 1 nagios nagios 300392 Nov 14 21:42 extinfo.cgi
-rwxrwxr-x. 1 nagios nagios 255432 Nov 14 21:42 histogram.cgi
-rwxrwxr-x. 1 nagios nagios 234728 Nov 14 21:42 history.cgi
-rwxrwxr-x. 1 nagios nagios 230792 Nov 14 21:42 notifications.cgi
-rwxrwxr-x. 1 nagios nagios 308448 Nov 14 21:42 objectjson.cgi
-rwxrwxr-x. 1 nagios nagios 226472 Nov 14 21:42 outages.cgi
-rwxrwxr-x. 1 nagios nagios 230856 Nov 14 21:42 showlog.cgi
-rwxrwxr-x. 1 nagios nagios 300296 Nov 14 21:42 status.cgi
-rwxrwxr-x. 1 nagios nagios 302496 Nov 14 21:42 statusjson.cgi
-rwxrwxr-x. 1 nagios nagios 251240 Nov 14 21:42 statusmap.cgi
-rwxrwxr-x. 1 nagios nagios 247048 Nov 14 21:42 statuswml.cgi
-rwxrwxr-x. 1 nagios nagios 230728 Nov 14 21:42 statuswrl.cgi
-rwxrwxr-x. 1 nagios nagios 255240 Nov 14 21:42 summary.cgi
-rwxrwxr-x. 1 nagios nagios 242952 Nov 14 21:42 tac.cgi
-rwxrwxr-x. 1 nagios nagios 263624 Nov 14 21:42 trends.cgi
I followed the installation guide (http://assets.nagios.com/downloads/nagi ... Source.pdf) step-by-step, so not sure what I might be missing here?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Can only access Nagios core homepage, all others fail

Post by Box293 »

Make sure SELinux is disabled:

Code: Select all

sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
setenforce 0
FYI I have a detailed guide here:
http://sites.box293.com/nagios/guides/i ... centos-6-5
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked