I'm planning on integrating this patch into 2.0 as soon as I make a
1.x branch in CVS. Just didn't want to jinx 1.0 by adding it late in
the game.
On 20 Sep 2002 at 11:52, Russell Scibetti wrote:
> I previously submitted a patch file for Nagios1.0b3 that would allow for
> the CGI's to be truly portable, as in no need to reconfigure or remake
> whenever you wanted to move them or have multiple instances of the CGI's
> on the same box. What I did was added a method to the cgiutils.c class
> to get the location of the cgi.cfg file from an environment variable,
> NAGIOS_CGI_CONFIG. If there is no environment variable set, then it
> will do what Nagios currently does and use the hard-coded value in the
> locations.h file (created with you ran ./configure).
>
> The patch never made it to the 1.0b6 release, so I recreated it and
> attached it to this email. It's easy to run. All you have to do is,
> before you do a make (after ./configure), copy this patch file into the
> /nagios-1.0b6/cgi directory and type patch -p1 and it will edit the cgi's properly. Then to set the environment
> variable, you need to edit your httpd.conf. I know how to do this for
> Apache (you need version 1.3.7 or higher). Inside the Directory entry
> you made for the /nagios/cgi-bin path you add the line:
>
> SetEnv NAGIOS_CGI_CONFIG /usr/local/nagios/etc/cgi.cfg
>
> Obviously change the value to be wherever your cgi.cfg is located. So
> if you ahve multiple set of CGI's running on one box (like we do here),
> for each different Directory entry, set the environment variable
> appropriately and all the CGI's will work fine.
>
> This is the only hardcoded reference the CGI's use. Inside cgi.cfg is
> the location of the main cfg file (nagios.cfg), and the cgi's parse the
> rest of the information they need from there. Just make sure that you
> have all your directory and file settings set properly in the config files.
>
> I'd really like to see this change added to the distribution. It allows
> for CGI portability and it is completely backward compatible. If
> someone can let me know how I can go about having this added to the
> normal Nagios distribution, I'd really appreciate it. Thanks.
>
> -Russell Scibetti
>
> --
> Russell Scibetti
> Quadrix Solutions, Inc.
> http://www.quadrix.com
> (732) 235-2335, ext. 7038
>
>
Ethan Galstad,
Nagios Developer
---
Email: nagios@nagios.org
Website: http://www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: nagios@nagios.org