Page 1 of 1

http://localhost/nagios not working

Posted: Thu Jun 30, 2016 12:54 am
by mmadden
Hi!
I am fumbling my way through my first experiment with Linux.
I have a Centos 7 VM. I installed Request Tracker on it as per these instructions:
http://binarynature.blogspot.com.au/201 ... ker-4.html
(Minus the hosts file entry, SELinux & SSL configuration).

I can access RT by typing the IP address of the Centos VM into a browser.

I then installed Nagios as per these instructions:
https://www.digitalocean.com/community/ ... n-centos-7

When it came to the step where you test the URL ($IPoftheVM$/nagios), I received an 500 internal error.
I tested the IP where I could access RT before the Nagios install, and also received a 500 internal error.

I went through the instructions, and found that the Nagios instructions changed the user apache's groups from rt to nagcmd.
I issued the command:
usermod -a -G rt,nagcmd apache
so that the user is in both groups.

Restart httpd, and once again I can access the Request Tracker page by going to the IP address of the linux VM! Hooray!
But when I try to access the Nagios page, I receive an error from Request Tracker saying "page not found".

The Request Tracker installation instructions include adding virtualhost settings to httpd.conf, which is what I believe makes the IP address of the VM point to the RT web site files.
Nagios did not include a step for adding virtualhost settings, so I am unsure where the settings are to tell apache to point IP/nagios to the Nagios web site files.
I hope that this all makes sense :?

Can you please help me figure out which config files I need to change so that I can access both RT and Nagios hosted on the same VM / apache.


Thank you,
Mel

Re: http://localhost/nagios not working

Posted: Thu Jun 30, 2016 9:50 am
by rkennedy
It should generate your httpd configs in /etc/httpd/conf.d/* folder. This happens when you run sudo make install-webconf as mentioned from the instructions you posted. Are you sure that you ran this command?

Re: http://localhost/nagios not working

Posted: Thu Jun 30, 2016 6:05 pm
by mmadden
rkennedy wrote:It should generate your httpd configs in /etc/httpd/conf.d/* folder. This happens when you run sudo make install-webconf as mentioned from the instructions you posted. Are you sure that you ran this command?
Yes, I ran all the commands listed in that setup page.

I ran it again just now to be sure. Still have the same problem.

Is there any way I can add virtualhost settings into /etc/httpd/conf/httpd.conf for Nagios?

Re: http://localhost/nagios not working

Posted: Thu Jun 30, 2016 8:22 pm
by mmadden
I have fixed the first part of my problem.

I added a second NIC to the virtual machine, and changed the virtual host configuration in http.conf to point the new ip address to the Nagios installation.
Now when I type that IP address into a browser, I get a login prompt! Yay!
But, when I successfully authenticate I get a 403 forbidden error :(

The httpd error log reads:

Code: Select all

/root/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/root/' is executable

Re: http://localhost/nagios not working

Posted: Fri Jul 01, 2016 1:39 am
by Box293
This sounds like a file permissions issue or a SELinux issue.

Do any of these articles help:

https://wiki.apache.org/httpd/PcfgOpenfile

http://stackoverflow.com/questions/2062 ... ck-htacces