Wednesday, October 7, 2009

Apache:Splitting Up a LogFile

Problem

Because of a large number of virtual hosts, you want to have a single logfile for all of them and split it up afterward.

Solution

LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost
CustomLog logs/vhost_log vhost

Then, after rotating your logfile:
split-logfile < logs/vhost_log

No comments:

Post a Comment