Subject: Re: httpd CGI support for apcupsd
To: Thomas Bieg <firstname.lastname@example.org>
From: Gilles Gravier <Gilles@Gravier.org>
Date: 04/28/2007 13:55:50
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
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.
bounce -p 3551 localhost 7000
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
Manuel... care to make that formal? :)
Thomas Bieg wrote:
> Gilles Gravier wrote:
>> Thomas Bieg wrote:
>>> You should be able to recompile your package with http support if you
>>> uncomment the relating lines in your sysutils/apcupsd/Makefile:
>>> #CONFIGURE_ARGS+= --enable-http # include http support
>>> #CONFIGURE_ARGS+= --enable-threads # compile threading code
>> I did a build with that. But it didn't put the CGI files anywhere I
>> could notice. :(
> Another closer look reveals that those options are no longer valid;
> you need to use --enable-cgi instead now...
> [This and the other problem with the default config file
> are worth a PR already, but as said before I don't even have the
> package installed. Maybe we can draw Manuel Bouyer's attention,
> he's the package maintainer...]
>> I assume the CGI actually call apcaccess with proper parameters... so
>> I think it should work.
> No, they connect to the integrated "network information server"
> (option NETSERVER) you already enabled.
>> Could you tar the CGI directories you use?
> It would probably be better if you try another recompile first,
> so we know if it works when done "right" (and let others with
> the same problem profit from that).
/*Gilles Gravier*/ *=* *Gilles@Gravier.org* <mailto:Gilles@Gravier.org>
ICQ : *77488526*
<http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN
Messenger : Gilles@Gravier.org <http://members.msn.com/Gilles@Gravier.org>*
*Skype : ggravier <callto://ggravier>* || *Y! : ggravier
<http://profiles.yahoo.com/ggravier> || AOL : gillesgravier
PGP Key ID : *0x8DE6D026*
"Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
"De toutes les aberrations sexuelles, la chasteté est la plus
aberrante." [Anatole France]