Nagios cgi-bin error

atstake atstake atstake at gmail.com
Sat May 27 01:22:09 CEST 2006


I am running Nagios version 2.0b4 with Apache 1.3.29 on OpenBSD 3.8.

Everytime I try to go to my http://website/nagios/cgi-bin it gives error -

Error 403
Forbidden
You don't have permission to access /nagios/cgi-bin/ on this server

However, http://website/nagios/ works fine!

Apache access_log shows -

nagiosadmin [26/May/2006:19:46:33 +1000] "GET /nagios/cgi-bin/this
.txt HTTP/1.1" 403 293

Apache error_log shows -

[Fri May 26 19:46:33 2006] [error] [client 203.13.45.66] file
permissions deny server execution: /myserver/nagios/cgi-bin/this.txt

Directory permission for "/var/www/mysite/nagios/cgi-bin" directory
looks like this -

drwxr-xr-x 2 root daemon 512 May 26 16:51 /nagios/cgi-bin/

File permissions on "/var/www/mysite/nagios/cgi-bin" directory looks like this -

-rw-r--r-- 1 root daemon 73 May 26 16:51 .nagios_passwd
-r-xr-xr-x 1 root bin 240064 Sep 4 2005 avail.cgi
-r-xr-xr-x 1 root bin 241600 Sep 4 2005 cmd.cgi
-r-xr-xr-x 1 root bin 202848 Sep 4 2005 config.cgi
-rw-r--r-- 1 root daemon 4 May 26 16:49 this.txt

Note: "this.txt" is a file I created.

Here's my nagios part of httpd.conf

ScriptAlias /nagios/cgi-bin /var/www/mysite/nagios/cgi-bin
<Directory "/var/www/mysite/nagios/cgi-bin/">
Options ExecCGI
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /var/www/mysite/nagios/cgi-bin/.nagios_passwd
Require user nagiosadmin
</Directory>


Alias /nagios /var/www/mysite/nagios
<Directory "/var/www/mysite/nagios/">
Options -Indexes
Order deny,allow
Deny from all
Allow from <my IP>
AuthType Basic
AuthName "Nagios"
AuthUserFile /var/www/mysite/nagios/.nagios_passwd
Require user nagiosadmin
</Directory>

I changed the permisson of the file "this.txt" to 755 & it gives
"Internal Server Error" if I want to view that file. For all the other
files (CGIs) it still gives the Permission Denied error.

my /etc/nagios directory is a symlink to /var/www/etc/nagios

I did a /usr/local/sbin/nagios -v /etc/nagios/nagios.cfg & it works
fine - shell exit code is 0.

Then I tried to start Nagios (/usr/local/sbin/nagios -d
/etc/nagios/nagios.cfg) & its shell exit code gives error -

in /var/log/messages I can see

/var/run/nagios/nagios.pid does not exist (ENOENT)
Bailing out due to errors encountered while attempting to daemonize...
(PID=12744)

I have a user called _nagios in /etc/passwd.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
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