Subject: Re: httpd CGI support for apcupsd
To: Gilles Gravier <Gilles@Gravier.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 04/28/2007 08:42:20
On Sat, 28 Apr 2007 13:55:50 +0200
Gilles Gravier <Gilles@Gravier.org> wrote:

> OK... So...
> 
> If I add :
> 
>     CONFIGURE_ARGS+=    --enable-cgi # include CGI support
> 
> to the Makefile, and make , then make update, the cgi scripts get
> copued to /etc/apcupsd ... at which point, I have to manually copy
> them to /usr/pkg/libexec/cgi-bin/ which is where, by default, Apache
> has its CGI directory.
> 
> Once that is done, it's not enough... multimon.cgi is hard coded to
> talk to localhost:3551... but the rest of the configuration for
> apcupsd uses port 7000... which means that multimon.cgi build isn't
> made to look for the right parameters.
> 
> Using :
> 
>     bounce -p 3551 localhost 7000
> 
> works fine.
> 
> Of course, a better way is to have SERVERPORT 3551
> in /usr/pkg/etc/apcupsd/apcupsd.conf and that works fine as well...
> 
> But I would prefer multimon.cgi to be built to use SERVERPORT as
> well, rather than have 3551 hardcoded.
> 
> So... all in all, it works... with --enable-cgi and a bit of manual
> configuration.
> 
> Manuel... care to make that formal? :)

In about 1.5 weeks, I'll have time to play with such things; maybe I'll
fix up the package to make that an option.

		--Steve Bellovin, http://www.cs.columbia.edu/~smb