Hi Mackan,
> What is the preferred way of rotating Apache's logfiles?
My preferred way is to use just one access_log and error_log. I've heard
good things about cronolog from ports too.
> I have many virtual domains, each with its own access and error logfile.
> I'm using CustomLog, not TransferLog. Apache is chrooted.
I use:
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i
\"" combined
CustomLog logs/access_log combined
%v = virtual host
I rotate the logs and then use Apache's own split-logfile:
/usr/bin/zcat /var/www/logs/access_log.0.gz
| /path/to/split-logfile
You need to change the path to perl on the first line of split-logfile. I
happen to keep this modified version in my $PATH.
[Watch out for my mail client wrapping long lines, btw]
QED for me... Nico