http://localhost/nagios not working

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
mmadden
Posts: 3
Joined: Thu Jun 30, 2016 12:12 am

http://localhost/nagios not working

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: http://localhost/nagios not working

Post 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?
Former Nagios Employee
mmadden
Posts: 3
Joined: Thu Jun 30, 2016 12:12 am

Re: http://localhost/nagios not working

Post 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?
mmadden
Posts: 3
Joined: Thu Jun 30, 2016 12:12 am

Re: http://localhost/nagios not working

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: http://localhost/nagios not working

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked