nagios / apache
Jeffery P. Humes
jeff at bofus.org
Wed Mar 9 14:02:35 CET 2005
Philipp,
since you compiled nagios to with "--with-htmurl=/home/nagios" it would
look here by default for "/cgi-bin", however you change that behavior
when you put an alias for "/" in your apache config. Now it is looking
for "/usr/local/nagios/share/home/nagios/cgi-bin/" because you set this
alias. This alias is pretty much cancelling out the "--with-htmurl"
compile time parameter you set.
Unless you are really wanting the setup all over the place like it
looks, There are a couple of ways to fix your problem:
1. recompile nagios with the normal settings, since it looks like you
are just repointing back to the default location
ServerName <servername.org>
DocumentRoot /usr/local/nagios/share
DirectoryIndex index.html index.html.var index.htm default.htm index.php
Options None
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
2. setup an apache alias for /home/nagios/cgi-bin
ScriptAlias /home/nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin/">
AllowOverride AuthConfig
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
-JPH
Philipp Snizek wrote:
>Hi
>
>I compiled nagios with --prefix=/usr/local/nagios
>--with-cgiurl=/home/nagios/cgi-bin --with-htmurl=/home/nagios.
>Apache Server however can't find the cgi scripts. Please see the error
>below.
>Most likely this is just due to my lack of knowledge how to configure
>apache correctly. Nevertheless following the documentation and
>changing the parameters needed didn't help much.
>
>Thanks for any help
>Regards,
>Philipp
>
>
>Listen ip.address:80
>NameVirtualHost ip.address:80
>
><VirtualHost host.domain.tld:80>
> ServerName host.domain.tld
> DocumentRoot "/home/nagios/"
> <Directory "/home/nagios/">
> AllowOverride None
> Options Indexes
> DirectoryIndex index.htm index.html index.php
> </Directory>
> ScriptAlias /cgi-bin/ /usr/local/nagios/sbin/
> <Directory "/usr/local/nagios/sbin/">
> AllowOverride AuthConfig
> Options +ExecCGI
> Order allow,deny
> Allow from all
> </Directory>
> Alias / /usr/local/nagios/share/
> <Directory "/usr/local/nagios/share">
> Options None
> AllowOverride AuthConfig
> Order allow,deny
> Allow from all
> </Directory>
></VirtualHost>
>
>That's the error I get for all cgi scripts. The path is wrong. I just
>can't figure out how to set it correctly.
>[Wed Mar 9 08:56:01 2005] [error] [client ip.address] File does not
>exist: /usr/local/nagios/share/home/nagios/cgi-bin/status.cgi
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://ads.osdn.com/?ad_ide95&alloc_id396&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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050309/0bbcff32/attachment.html>
More information about the Users
mailing list