Apache 1.3 + Nagios CGI = failure

Lukasz Szmit lukasz.szmit at ucd.ie
Thu Nov 3 15:42:02 CET 2005


Hi,

I'm trying to setup a second nagios test box and have encountered a
problem with the CGI scripts. I have read all the CGI related FAQs I was
able to find, but with no success.

I'm trying to run Nagios 2.0.4b on Apache 1.3.33 under Debian Sarge.
Nagios was compiled with --prefix=/usr/nagios, the rest was left with
default settings.

The Nagios service starts and works fine. I can access the web
interface. I have disabled authentication for the moment, so there are
no .htaccess files in any of the Nagios directories and cgi.cfg contains
"use_authentication=0". Still, I can't access the CGI scripts and Apache
is logging the follwing:

[Thu Nov  3 14:13:26 2005] [error] (13)Permission denied: exec
of /usr/nagios/sbin/tac.cgi failed
[Thu Nov  3 14:13:26 2005] [error] [client x.y.z.a] malformed header
from script. Bad
header=Launching... /usr/lib/apache-s: /usr/nagios/sbin/tac.cgi

Any ideas what might be wrong?

httpd.conf has the following:

<VirtualHost *:443>
DocumentRoot /var/www
SSLEnable
SSLCertificateFile /etc/apache-ssl/apache.pem

ErrorLog /var/log/apache-ssl/ext_error.log
CustomLog /var/log/apache-ssl/ext_access.log combined

ScriptAlias /nagios/cgi-bin /usr/nagios/sbin
<Directory "/usr/nagios/sbin">
   AddHandler cgi-script .cgi
   Options ExecCGI
   AllowOverride AuthConfig
   Order allow,deny
   Allow from 127.0.0.1
</Directory>

Alias /nagios /usr/nagios/share
<Directory "/usr/nagios/share">
   Options None
   AllowOverride AuthConfig
   Order allow,deny
   Allow from 127.0.0.1
</Directory>
</VirtualHost>

Permissions for /usr/nagios are set to:

drwxrwxr-x   7 nagios nagios 4096 2005-11-03 13:38 .
drwxrwxr-x   2 nagios nagios 4096 2005-11-03 13:37 bin
drwxrwxr-x   2 nagios nagios 4096 2005-11-03 14:16 etc
drwxrwxr-x   2 nagios nagios 4096 2005-11-03 14:16 sbin
drwxrwxr-x   8 nagios nagios 4096 2005-11-03 13:37 share
drwxrwxr-x   4 nagios nagios 4096 2005-11-03 14:20 var


regards,
-- 
Lukasz Szmit | University College Dublin
http://www.ucd.ie/computing/aboutus.html



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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