Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2005 14:09:30 +0100
From:      Holger Kipp <hk@alogis.com>
To:        Ladislav Bodnar <distro.watch@msa.hinet.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Rotating web server logs without restarting Apache
Message-ID:  <20051125130930.GA71513@intserv.int1.b.intern>
In-Reply-To: <200511250845.43542.distro.watch@msa.hinet.net>
References:  <200511250845.43542.distro.watch@msa.hinet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051125130930.GA71513>