Fwd: rotatelogs is rotating too quickly...

John Almberg jalmberg at identry.com
Wed Aug 20 14:37:57 UTC 2008

> John Almberg wrote:
>> I'm a newbie admin and I've just figure out something that will be  
>> obvious to most on this list... that apache log files can get big,  
>> fast.
> What apache version you are using? rotatelogs syntax differ a lot  
> between them.

Version - Apache/2.2.6 (FreeBSD) mod_ssl/2.2.6 OpenSSL/0.9.7m DAV/2  
PHP/5.2.5 with Suhosin-Patch

rotatelogs doesn't seem to have a --version argument, but if I just  
type it on the command line it prints out the following usage message:

[identry at on:www]> rotatelogs
Usage: rotatelogs [-l] <logfile> <rotation time in seconds> [offset  
minutes from UTC] or <rotation size in megabytes>

Add this:

TransferLog "|rotatelogs /some/where 86400"


TransferLog "|rotatelogs /some/where 5M"

to httpd.conf. The generated name will be /some/where.nnnn where nnnn  
is the
system time at which the log nominally starts (N.B. if using a  
rotation time,
the time will always be a multiple of the rotation time, so you can  
cron scripts with it). At the end of each rotation time or when the  
file size
is reached a new log is started.

More information about the freebsd-questions mailing list