views:

263

answers:

1

Following this guide on CentOS 5.2, just getting nagios set up for the first time. The main page shows up just fine, but when I try to view any of the pages that should be generated by a cgi process, firefox prompts me to save the .cgi instead, so apache's obviously not understanding that it needs to run the cgi and get back some html from it.

The odd thing is, though, that, as far as I can tell, apache should be running these files as cgi. nagios.conf:


# 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/lib/nagios/cgi/"


#  SSLRequireSSL
   Options +ExecCGI
   AddHandler cgi-script .cgi
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-user


Alias /nagios "/usr/share/nagios/"


#  SSLRequireSSL
   DirectoryIndex index.php
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-use

Either the ScriptAlias directive or ExecCGI option should be triggering this, but neither of them seems to have any effect.

This config file is being parsed by apache, because if I move it out of conf.d, /nagios gives a 404.

The .cgi files are indeed in the /nagios/cgi-bin/ directory, so I didn't specify the incorrect directory.

Searching seemed to only provide people who had difficulty with permissions, which is not the issue here. This seems to me to be a pretty basic thing, but even with the excellent apache documentation, I'm at a bit of a loss (been using cherokee too much lately :) ).

A: 

verify it is set as executable (i do believe) and that apache has permission to exec, AND, knows how to handle CGI's properly.

also, are your alias's correct? is there something at /usr/share/nagios, as well as at /usr/lib/nagios/cgi/? (just not how i do things)

meesterfox