httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "timuel" <>
Subject [users@httpd] dynamic transferlog names
Date Wed, 09 Apr 2003 21:14:18 GMT
Hey everybody,   (...Hey Dr. Nick!!)

I have two linux boxes running 1.3.27 that share the same docroot and log
directories over NFS mounts. Both machines have their own local copies of
"httpd.conf" which include an NFS mounted "nvhosts.conf" file via the "Include"
directive. (this way I can load-balance two identical machines via DNS.)

I can't get the LockFile stuff working very reliably for writing the logs to the
same NFS logfile and would like to have each machine write to a differennt
logfile name (in the same NFS dir) based on an enviromental variable while still
sharing the same NFS-mounted "nvhosts.conf" file -- e.g. "TransferLog
/home/logs/mydomain.log-$ENV{'HOSTNAME'}". Obviously this example doesn't work.

I would like to firstly see if anyone has any slick suggestions in order to
accomplish this without having to use mod_perl.

If using mod_perl is my only solution... I can do a quick
$loghost = $ENV{'HOSTNAME'};
$TransferLog = '/usr/local/etc/httpd/logs/timuel_access.log-'.$loghost;

HOWEVER -- I can't seem to pull env vars into this... $ENV{'ANYTHING'} is always
null (even when I explicitly I use PerlSetEnv or SetEnv). Any clues on this one?



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message