Nagios4 and apache 2.4

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.
janroc
Posts: 7
Joined: Fri Aug 01, 2014 3:34 am

Re: Nagios4 and apache 2.4

Post by janroc »

If found the problem, my index.php have wrong paths to the files.
If I surf to the main.php or other cgi everything is ok.

Is there a main config file to change of the path to the other files?

Jan
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Nagios4 and apache 2.4

Post by eloyd »

The file that Nagios uses is generally /usr/local/nagios/etc/nagios.cfg. Of course, the "/usr/local/nagios/" part is going to be specific to your installation.

If you're asking about the Apache config files, they are usually in /etc/httpd/ in the conf or conf.d directories.

If you are asking about paths to specific files within PHP files located in your web tree, then you are going to be on your own and likely need to check each one.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
janroc
Posts: 7
Joined: Fri Aug 01, 2014 3:34 am

Re: Nagios4 and apache 2.4

Post by janroc »

So there is no main nagios config file that the index.php is using to be able to find the .cgi nagios file via Apache?
Should I change the paths in the index.php file to get this working?
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Nagios4 and apache 2.4

Post by eloyd »

index.php is generated when Nagios is installed. If you installed from packages, it should have been set to the directory that the package was installed to. If you installed from source, it would be set to whatever you chose during the ./configure run.

Normally, index.php for Nagios is stored in /usr/local/nagios/share and contains two links within frames to "side.php" and "main.php" (other links to nagios.com, etc, are not important for this discussion). "main.php" is defined in a PHP variable called "$url" which is set during the ./configure generation and is almost always "main.php" unless you change it.

There should be no other changes required.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
Locked