Apache Log Rotation

Lars Kellogg-Stedman lars at larsshack.org
Fri Nov 17 20:54:16 EST 2000


On Fri, 17 Nov 2000, Sheldon Dubrowin wrote:

> also be something I can run from cron once a month.  I have a mailbox
> archiver, and a syslog archiver, but I have had no luck finding one for
> apache.  Any help or ideas would be greatly appreciated.  My access-log file
> is over 100MB now.  :-(

Apache ships with a log rotation program called, oddly enough,
"rotatelogs".  You set up apache to log via a pipe to logrotate, which
then handles automatic periodic rotation of your logs without ever
having to restart your server.

You can find the source to rotatelogs in src/support/rotatelogs.c (in
the apache distribution).  There's even a man page for it.

-- Lars


-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list