CGI's Won't Work - Output is garbage

Marc Powell marc at ena.com
Sun May 23 21:34:26 CEST 2004


Dixie Peterson <mailto:dpeterson3 at san.rr.com> wrote:
> Hello!
> 
> I recently installed Nagios 1.2 on a system running RedHat Linux 9. 
> The installation went fine, but I can't seem to get the CGI's to
> work.  When I try to run them through the web interface all I get for
> output is gibberish.  When I run them on the command line and monitor
> them with strace, I get errors like this:    
> 
> open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
> directory)
> open("/usr/local/nagios/share/ssi/avail-footer.ssi", O_RDONLY) = -1
> ENOENT (No such file or directory)
> open("/usr/local/nagios/share/ssi/common-footer.ssi", O_RDONLY) = -1
> ENOENT (No such file or directory)   

It's more likely that your web server just doesn't know what do to with
cgi files and is simply displaying them instead of executing them...
Make sure your web server is properly configured to execute cgi files.
If you're using apache, you probably need to make sure you have the
following --

LoadModule cgi_module         modules/mod_cgi.so
AddModule mod_cgi.c
AddHandler cgi-script .cgi

<Directory /usr/local/nagios/sbin>
        AllowOverride AuthConfig
        Options FollowSymLinks ExecCGI
        Satisfy All
</Directory>

You'll need to restart apache if you modify httpd.conf of course.

--
Marc 



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list