httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "timuel" <timuel-apa...@voicenet.com>
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
<Perl>
$loghost = $ENV{'HOSTNAME'};
$TransferLog = '/usr/local/etc/httpd/logs/timuel_access.log-'.$loghost;
</Perl>

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?

TIA.

--timuel


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message