[plug] Apache ScriptAlias question

Denis Brown dsbrown at cyllene.uwa.edu.au
Tue Feb 10 13:21:25 WST 2004


Dear PLUG list members,

Maybe I'm missing The Bleeding Obvious (tm) but this has me tossed 
ATM.   In Apache (2.0.48 on Debian woody) I have need to use ScriptAlias in 
the httpd.conf file.   I would like to nominate several script alii 
(aliases?) such as

ScriptAlias /cgi-bin/ "/some/where/cgi-bin/"
ScriptAlias /cgi-bin/ "/another/place/cgi-bin"   and so on.

Part of the motivation is to employ the graphical output from nut (network 
UPS tools), without having to recall to symlink or mv the script files from 
nut's area to Apache's usual cgi-bin location.   This machine may 
eventually have other progs outputting via cgi, so the ability to specify 
multiple ScriptAlias statements would be handy.

I've done some digging and I have seen reference to the fact that it is 
possible but for some *&@#!! reason it does not happen for 
me.   Furthermore, if I have two ScriptAlias lines in the config, Apache 
only takes note of the first.  This has the effect of hiding the later 
one(s).   For example:
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
ScriptAlias /cgi-bin/ "/usr/local/ups/cgi-bin/"    returns a 
script-not-found if I want to reference the nut script upsstats.cgi   The 
error log shows that Apache tried to find it in /usr/local/apache2/cgi-bin 
and gave up.   In other words, Apache did not then try the next such alias.

Not yet tried:   comma / space / semicolon-delimited list of directories.

Any thoughts?
TIA,
Denis

P.S.   Anyone looking for a decent UPS monitoring solution would be advised 
to have a browse at Network UPS Tools.   I have some APC Smart-UPS's to 
babysit and spent far too long trying vainly to get the supplied PowerChute 
stuff happening.   Nut on the other hand, once I got my head around the 
interminable config files, went in painlessly.   Yay for Open Source!   Oh, 
if you're implementing it and cannot get the graphical output going, the 
template file (upsstats.html) must be placed in the cgi-bin directory.





More information about the plug mailing list