Webpage cannot find and load the .cgi files from index.php

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.
eocastilleja
Posts: 15
Joined: Mon Jul 25, 2016 3:52 pm

Webpage cannot find and load the .cgi files from index.php

Post by eocastilleja »

I have installed Nagios Core and have a working homepage. But when I try to go to Map or Comments the corresponding cgi files cannot be located.

All of the files are in downloads/nagios-3.2.3/cgi but they are not being found.

Has anyone else had trouble and fixed this problem?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Webpage cannot find and load the .cgi files from index.p

Post by rkennedy »

Can you post your /var/log/httpd/error_log file for us to look at? This should help to see what the exact error is.
Former Nagios Employee
eocastilleja
Posts: 15
Joined: Mon Jul 25, 2016 3:52 pm

Re: Webpage cannot find and load the .cgi files from index.p

Post by eocastilleja »

I attatched a snapshot of most of the errors that I am getting
Last edited by eocastilleja on Wed Jul 27, 2016 1:58 pm, edited 1 time in total.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Webpage cannot find and load the .cgi files from index.p

Post by rkennedy »

My guess is because of where you installed it, you're missing the re-write for the CGI files. We will need to see the entire error_log, as this doesn't contain the part we need.
Former Nagios Employee
eocastilleja
Posts: 15
Joined: Mon Jul 25, 2016 3:52 pm

Re: Webpage cannot find and load the .cgi files from index.p

Post by eocastilleja »

Is this what you need?
Last edited by eocastilleja on Wed Jul 27, 2016 2:37 pm, edited 1 time in total.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Webpage cannot find and load the .cgi files from index.p

Post by mcapra »

If we could get the file in plain text, that would be ideal. None of my editors seem to recognize the encoding of that rtf file.
Former Nagios employee
https://www.mcapra.com/
eocastilleja
Posts: 15
Joined: Mon Jul 25, 2016 3:52 pm

Re: Webpage cannot find and load the .cgi files from index.p

Post by eocastilleja »

Sorry about that
Attachments
errorLog.txt
(8.76 KiB) Downloaded 279 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Webpage cannot find and load the .cgi files from index.p

Post by rkennedy »

For the record, this is a pretty unstandard install path wise. When you configured nagios, you there is a step that creates the apache rule needed for the CGIs. You should have a rewrite rule in your /etc/httpd/conf.d/nagios.conf file for apache. It should contain something like this -

Code: Select all

# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

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

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Core"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
   Require valid-user
</Directory>
If not, you'll need to create it, and adjust the paths accordingly. Then, restart apache. service httpd restart

If that doesn't work, please try to open up the cgi files in your web browser a few times, and then upload your error_log + everything in your /etc/httpd/conf.d/ directory.
Former Nagios Employee
eocastilleja
Posts: 15
Joined: Mon Jul 25, 2016 3:52 pm

Re: Webpage cannot find and load the .cgi files from index.p

Post by eocastilleja »

I tried what you said and it still doesn't seem to work.
I included the error log and what was contained in httpd.conf which is the only thing in /etc/httpd/conf.d/nagios.conf/

Also I had htmlCGI as a file path only to test if putting them in the same file would work but I deleted that.
Also included is what I see when trying to run the nagios web interface.
Attachments
webImage.jpg
httpd.conf.txt
(1.34 KiB) Downloaded 282 times
errorLog.txt
(98.97 KiB) Downloaded 280 times
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Webpage cannot find and load the .cgi files from index.p

Post by tgriep »

What is the OS and version number are you trying to install Nagios on?
There may be a pre-compiled version available for your system. Are you willing to install that?
If not, can you post the steps you took to compile and install Nagios?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked