cgi config file name
Ethan Galstad
nagios at nagios.org
Wed Aug 11 03:25:30 CEST 2004
This feature should already be available in the 2.x code. I didn't
add it to the 1.x branch, as it was more of a feature enhancement,
rather than a bug request. Although that argument could be made...
On 9 Aug 2004 at 16:23, duverger wrote:
>
> Hi all,
>
> For H-A cluster purpose, i need to run 2 nagios on the same host. The
> problem is that config file name for cgis is hard coded.
>
> So i added support of environment variable for cgi config file name
> setting.
>
> I hope this could be inserted in nagios dev stream.
>
> Since i do not work with cvs snapshots, i give you a kind of "diff
> file" to see what as changed (very minor) in source code.
>
> In order to use it, you have to load apache env module and declare in
> "NAGIOS/etc/apache.conf" :
>
> SetEnv NAGIOS_CGI_CONFIG_FILE /path/to/cgi/config/filename
>
> *** CUT diff cgiutils.c v1.2 ***
> 240,250d239
> < /* retrieve cgi config file name first from environment variable
> then by parameter given from locations.h */ < char*
> get_cgi_config_file_by_env(char *filename) < { < char *env=0; < < if(
> env=getenv("NAGIOS_CGI_CONFIG_FILE") ) < return env; < < return
> filename; < } < *** CUT HERE ***
>
> *** CUT diff locations.h.in v1.2 ***
> 34c34
> < #define DEFAULT_CGI_CONFIG_FILE
> get_cgi_config_file_by_env("@sysconfdir@/cgi.cfg")
> ---
> > #define DEFAULT_CGI_CONFIG_FILE
> "@sysconfdir@/cgi.cfg"
> *** CUT HERE ***
>
> *** CUT diff cgiutils.h.in v1.2 ***
> 389a390
> > char * get_cgi_config_file_by_env(char *);
> *** CUT HERE ***
>
>
> Regards,
>
> stef
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
More information about the Developers
mailing list