CGI execute

Tom Welsh twelsh at square-box.com
Thu Mar 6 10:17:45 CET 2003


Hi Brad,

I notice that in your V config you have your doc route set to
/usr/local/nagios and not usr/local/nagios/share and you have a + in
front of Options +ExecCGI

Here is my v config for my nagios server at demo.square-box.com. All my
apache and nagios config files live there for everyone to see. Its at
http://demo.square-box.com and the running site is at
nagios.square-box.com

Hope this helps

Tom Welsh
twelsh at square-box.com

#######################################################
#######################################################
##
## nagios.somedomain.net definition
##
#######################################################
#######################################################
#Site that shows full Nagios Demo Config's
## Script aliases for Nagios scrip aliases. they live
## in /usr/local/nagios/sbin/

NameVirtualHost 10.10.10.10:80
<VirtualHost 10.10.10.10:80>
ServerAdmin webmaster at somedomain.com
DocumentRoot /usr/local/nagios/share
ServerName nagios.somedomain,com
ServerAlias anothername.somedomain.com
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin/">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

## Setup alias for /nagios/ to point to
## /usr/local/nagios/share/

Alias /nagios/ /usr/local/nagios/share/

<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
 

##########################################################
## Web server authentication for
## /usr/local/nagios/sbin Nagios cgi scripts
## /usr/local/nagios/share Nagios HTML pages
##########################################################

<Directory /usr/local/nagios/sbin>
AllowOverride AuthConfig
order allow,deny
allow from all
Options ExecCGI
</Directory>
 

<Directory /usr/local/nagios/share>

AllowOverride AuthConfig
order allow,deny
allow from all
</Directory>
</VirtualHost>
 
Allow
Order allow,deny
Allow from all
</Directory>
 
</VirtualHost>


-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Brad Dunn
Sent: 06 March 2003 06:37
To: 'nagios-users at lists.sourceforge.net'
Subject: [Nagios-users] CGI execute

Hello there, I'm currently going over someone's Nagios server and have
come
across a problem. this is a fairly simple problem I'm sure and I'm
fairly
certain I've made just a simple typo, but I've read as much Nagios
documentation as I can in regards to this but I'm just having an issue
getting the CGI's working on the nagios site.

Note that my nagios is all working fine and monitoring no worries, its
just
the site CGI's that don't seem to work. I have a fairly good suspicion
that
I've just got one of the script alias's wrong or something like that.
Once
again apologies for the lame help request.

OS: Debian 
Version NFO: 
Nagios 1.0
Copyright (c) 1999-2002 Ethan Galstad (nagios at nagios.org)
Last Modified: 11-24-2002

Error:
When I run the CGI's from the web interface I get an internal Server
Error 
<SNIP>
The server encountered an internal error or misconfiguration and was
unable
to complete your request
</SNIP>

This is my vhost for apache

<SNIP>
<VirtualHost IP.IP.IP.IP>
        ServerName nagios.domain.com.au
        ServerAdmin helpdesk at domain.com.au
        DocumentRoot /usr/local/nagios

        User nagios
        Group nagios

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

        Errorlog logs/nagios-web.error
        CustomLog logs/nagios-web.access common

        <Directory /usr/local/nagios/>
                Options +ExecCGI
        </Directory>

        ScriptAlias /cgi-bin/nagios/ /usr/local/nagios/cgi/
        <Directory "/usr/local/nagios/cgi-bin/">
        AllowOverride AuthConfig
        Options ExecCGI
        Order allow,deny
        Allow from all
        </Directory>
</Virtualhost>
</SNIP>


This is from CGI.CFG in /usr/local/nagios/etc


physical_html_path=/usr/local/nagios/share
url_html_path=/nagios

The nagiosadmin user I've got does have access to the CGI's (execute and
everything. I even just did a 777 to make sure at one point). 

My cgi's etc are also located in /usr/local/nagios.cgi


Makefile     avail.cgi      cmd.cgi     extinfo.c    history.c
notifications.cgi  showlog.c    statuswml.cgi  tac.cgi
Makefile.in  cgiutils.c     config.c    extinfo.cgi  history.cgi
outages.c          showlog.cgi  statuswrl.c    trends.c
auth.c       cgiutils.h     config.cgi  getcgi.c     lifo.c
outages.cgi        status.c     statuswrl.cgi
auth.h       cgiutils.h.in  edata.c     getcgi.h     lifo.h
popen.c            status.cgi   summary.c
auth.o       cgiutils.o     edata.h     getcgi.o     lifo.o
popen.h            statusmap.c  summary.cgi
avail.c      cmd.c          edata.o     histogram.c  notifications.c
popen.o            statuswml.c  tac.c


If anyone's got any idea on where my problem might be, or any idea's on
what
to verify my configs against. That would be very much appreciated. Some
times it just takes an outsider to point out a simple mistake.

Thanks

Brad


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The
debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost
and 
disoriented. TotalView can help you find your way. Available on major
UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
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





-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
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