nagios / apache

Luis Vidrio vid1972 at azteca.vidworld.net
Wed Mar 9 15:00:07 CET 2005


Askar Ali wrote:

> 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
>>
>>
>>  
>>
> would compare your's httpd.conf with these lines, may be this could help
> ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
> <Directory "/usr/local/nagios/sbin">
>    AllowOverride AuthConfig
>    Options ExecCGI
>    Order allow,deny
>    Allow from all
> </Directory>
> Alias /nagios /usr/local/nagios/share
> <Directory "/usr/local/nagios/share">
>    Options None
>    AllowOverride AuthConfig
>    Order allow,deny
>    Allow from all
> </Directory>
>
>
>
>
> -------------------------------------------------------
> 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_id=6595&alloc_id=14396&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



Try making the following changes in bold below. Since your sbin and 
share directories are now under /home/nagios/sbin and /home/nagios/share 
then you'll need to tell Apache that they are there. Hope this helps.

<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/ */home/nagios/sbin/ *
        <Directory *"/home/nagios/sbin/"*>
           AllowOverride AuthConfig
           Options +ExecCGI
           Order allow,deny
           Allow from all
         </Directory>
   Alias */nagios* */home/nagios/share/ *
         <Directory *"/home/nagios/share*">
           Options None
           AllowOverride AuthConfig
           Order allow,deny
           Allow from all
         </Directory>
</VirtualHost>



-------------------------------------------------------
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_id=6595&alloc_id=14396&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