Page 1 of 1
cgi files not found
Posted: Thu Mar 22, 2012 4:32 am
by peppos
I've installed nagios on my server but when connecting on
http://ip/nagios3 except from the home page all other pages return an error message like
The requested URL /cgi-bin/nagios3/status.cgi was not found on this server.
The specific paths/files (/cgi-bin/nagios3/status.cgi) exist on server.
When opening the actual url on a new tab (e.g.
http://ip/cgi-bin/nagios3/status.cgi?se ... le=summary) i still get the same error but after changing the url to
http://ip/nagios3/cgi-bin/status.cgi?se ... le=summary it's working, so i don't know if this has to do with the aliases or something else..?
Re: cgi files not found
Posted: Thu Mar 22, 2012 11:48 am
by mguthrie
Can you post your apache alias settings in /etc/apache2/conf.d/ ? Looks like an alias issue.
Re: cgi files not found
Posted: Thu Mar 22, 2012 12:38 pm
by peppos
Thanks for the reply!
in etc/apache2/conf.d/ there's a nagios3.conf which is like a shortcut for /etc/nagios3/apache2.conf
The content of this file is:
Code: Select all
# apache configuration for nagios 3.x
# note to users of nagios 1.x and 2.x:
# throughout this file are commented out sections which preserve
# backwards compatibility with bookmarks/config for older nagios versios.
# simply look for lines following "nagios 1.x:" and "nagios 2.x" comments.
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 1.x:
#ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3
#ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 2.x:
#ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3
#ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3
# Where the stylesheets (config files) reside
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
# nagios 1.x:
#Alias /nagios/stylesheets /etc/nagios3/stylesheets
# nagios 2.x:
#Alias /nagios2/stylesheets /etc/nagios3/stylesheets
# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs
# nagios 2.x:
#Alias /nagios2 /usr/share/nagios3/htdocs
# nagios 1.x:
#Alias /nagios /usr/share/nagios3/htdocs
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios3/htpasswd.users
# nagios 1.x:
#AuthUserFile /etc/nagios/htpasswd.users
require valid-user
</DirectoryMatch>
# Enable this ScriptAlias if you want to enable the grouplist patch.
# See http://apan.sourceforge.net/download.html for more info
# It allows you to see a clickable list of all hostgroups in the
# left pane of the Nagios web interface
# XXX This is not tested for nagios 2.x use at your own peril
#ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
# nagios 1.x:
#ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
Is this the right file?
Re: cgi files not found
Posted: Fri Mar 23, 2012 9:31 am
by mguthrie
Code: Select all
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
I'm wondering if the second rule is overwriting the first. Try commenting out the second one and restarting apache.
Re: cgi files not found
Posted: Fri Mar 23, 2012 10:36 am
by peppos
same result...