Page 1 of 3
Webpage cannot find and load the .cgi files from index.php
Posted: Tue Jul 26, 2016 4:23 pm
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?
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 10:15 am
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.
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 11:41 am
by eocastilleja
I attatched a snapshot of most of the errors that I am getting
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 11:56 am
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.
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 2:17 pm
by eocastilleja
Is this what you need?
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 2:20 pm
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.
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 2:37 pm
by eocastilleja
Sorry about that
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 2:54 pm
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.
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Wed Jul 27, 2016 5:11 pm
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.
Re: Webpage cannot find and load the .cgi files from index.p
Posted: Thu Jul 28, 2016 12:38 pm
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?