Rotating web server logs without restarting Apache
Holger Kipp
hk at alogis.com
Fri Nov 25 13:09:37 GMT 2005
On Fri, Nov 25, 2005 at 08:45:43AM +0800, Ladislav Bodnar wrote:
> Hi,
>
> Every time my httpd-access.log file is rotated I need to restart Apache,
> otherwise it won't write into the new httpd-access.log file.
I usually use something like
CustomLog "|/usr/local/sbin/rotatelogs /var/log/apache/logname.%Y%m%d%H 3600" combined
This will automatically write to a new file every hour. See "man rotatelogs".
rotatelogs is part of apache installation afaik.
Regards,
Holger Kipp
alogis AG, Berlin
More information about the freebsd-stable
mailing list