changing location of cgi.cfg file

Marc Powell marc at ena.com
Mon May 23 19:38:39 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Steve Ensley
> Sent: Monday, May 23, 2005 11:57 AM
> To: Nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] changing location of cgi.cfg file
> 
> The web front end (NagiosQL) I'm configuring for use with Nagios 2
> assumes the configuration is in a directory structure off /etc/nagios.
>   I've gotten everything working reasonably well except, and I know
> this is probably a painfully stupid question, but I cant find where to
> properly tell nagios where to find the cgi.cfg file.  There doesnt
> seem to be a option for it in nagios.cfg,  I tried a cfg_file=
> directive for it but it choked on that on startup.  The manual refers
> to the "usual" location for the cgi.cfg file but doesnt seem to
> mention how to make it an unusual location.
> 
> If its in /usr/local/nagios/etc, nagios is happy but NagiosQL cant
> find it unless I configure nagiosql to look for it there (I would
> prefer to keep all the config files together).  If I put it in
> /etc/nagios where NagiosQL would like to find it by default then
> nagios starts OK but when you click on an option on the nagios web
> interface it chokes with "Error: Could not open CGI config file
> '/usr/local/nagios/etc/cgi.cfg' for reading!"  which of course is not
> where it should be looking for it.
> 
> I can make everything work by creating a symbolic link to
> /etc/nagios/cgi.cfg in /usr/local/nagios/etc/ but that's a clumsy hack
> and there is undoubtedly a proper way to change this.

The location for cgi.cfg (and the other config files) is set at compile
time so whoever compiled your installation of Nagios 2 specified that
location. If you want to change that without recompiling then follow the
directions under 'Config File Location' at
http://nagios.sourceforge.net/docs/2_0/configcgi.html

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&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