[rhn-users] Apache2 (RedHat Enterprise) isn't logging using SetEnv VLOG

Chris Sammis csammis at cs.iastate.edu
Mon Jan 10 14:33:56 UTC 2005


A week and a half ago my workplace transitioned to a new web server 
running RedHat Enterprise 3 and Apache 2.0.46_ent (coming from Gentoo, 
Apache version 2.0.46). We have a lot of vhosts, and they all want their 
own logs, so we used the SetEnv VLOG / piping to split-logfile method of 
logging; that is, we set VLOG globally and piped the output to 
split-logfile to get logs like VLOG-2004-01-www.myhost.com.log for each 
vhost. This was immensely helpful with our log analysis and archiving tools.

However, that isn't working on the new server. VLOG log files aren't 
getting written. Here's what I've tried:

* Turning up the error level on the error log (which is working). It 
doesn't show anything out of the ordinary.
* Using a combined log file. The combined logfile writes properly, but 
that won't work for our setup.
* Checking directory permissions. Everything's okay, like I said the 
combined log file and error log files operate normally.
* Manually calling the split-logfile script and injecting a couple of 
made-up log lines. That works correctly too, the made-up lines are 
appended to the appropriate VLOG file.
* Putting some bad syntax into the split-logfile script and seeing what 
happens. The error log starts filling up with "script failed 
unexpectedly" messages, so apparently the server is calling the script.

Here's the relevant lines of httpd.conf. They're copied verbatim out of 
our old apache2.conf and placed at the end of the new httpd.conf, so I 
know they aren't getting overriden by anything.

LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\" VLOG=%{VLOG}e" vhosts
SetEnv VLOG ""
CustomLog "|/usr/sbin/split-logfile" vhosts env=VLOG

All other CustomLog directives are commented out, and that's the only 
SetEnv VLOG directive present.
Anyone have any ideas for troubleshooting I haven't tried yet? Thanks.

-- 
Chris Sammis
Mobile: 515-450-9553
On the Web: http://csammisrun.net
"Computer science is no more about computers than astronomy is about telescopes" -- E. J. Dijkstra




More information about the rhn-users mailing list