Do not have access to any .cgi file !!!

Tedman Eng teng at dataway.com
Mon Oct 30 19:50:37 CET 2006


Check file permissions, keeping in mind that the Apache daemon and Nagios
daemon usually run as different users.  Can the apache user access the files
located in /usr/local/nagios/sbin?  Also check all parent directories for
proper permissions.

For testing, backup then edit your /etc/passwd file and give the Apache user
a real login shell, then login as the apache user and try to navigate to
that directory.  Once there try to run the .cgi from commandline:

# export REQUEST_METHOD="GET"
# /usr/local/nagios/sbin/status.cgi
(If working properly, should spew out a lot of HTML)
# unset REQUEST_METHOD

Once this is working, apache should have no more problems.  Don't forget to
set your /etc/passwd back to original.


-----Original Message-----
From: Nene [mailto:nene at sal.gbnet.cc]
Sent: Monday, October 30, 2006 10:28 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Do not have access to any .cgi file !!!


Hello list, I'm still crashing my hed to the wall, trying to get Nagios
ready !!!!!!

At this time I have problems accessing the host information through web:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.

I got into apache log error files, and notice this:
[Mon Oct 30 12:04:12 2006] [error] [client x.x.x.x] (13)Permission denied:
exec of '/usr/local/nagios/sbin/status.cgi' failed, referer:
http://x.x.x.x/nagios/side.html
[Mon Oct 30 12:04:12 2006] [error] [client x.x.x.x] Premature end of script
headers: status.cgi, referer: http://x.x.x.x/nagios/side.html


So I'd read the documentation AGAIN and check AGAIN the httpd.conf, and
there is all like it should be (I hope):


### Section 4: Nagios Configuration Files

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin

<Directory "/usr/local/nagios/sbin">
        AllowOverride AuthConfig
        Options ExecCGI
        Order allow,deny
        Allow from all
        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/nagios/etc/nagios.pwd
        Require valid-user
</Directory>

Alias /nagios /usr/local/nagios/share

<Directory "/usr/local/nagios/share">
        Options None
        AllowOverride None
        Order allow,deny
        Allow from all
        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/nagios/etc/nagios.pwd
        Require valid-user

</Directory>

Then I surf the server directly, looking for side.html file, I access to it,
but when I click in any monitoring features, I got this error:

The file /nagios/cgi-bin/status.cgi?host=all cannot be found. Please
check......

So I try to locate manually but there is no file with that name in my server
!!!!!

What I'm doing wrong this time ????



Muchas gracias


David

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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