Rotating web server logs without restarting Apache
Philip Murray
pmurray at nevada.net.nz
Fri Nov 25 01:18:58 GMT 2005
On 25/11/2005, at 1:45 PM, Ladislav Bodnar wrote:
> Is there a way for Apache (version 2.0.55 on FreeBSD 6.0) to write
> to the
> new log file without the need to restart it? I restart it routinely
> from a
> cron job, but occasionally Apache fails to restart (or more
> precisely, if
> fails to shutdown completely before it is told to come up again).
Look at sysutils/cronolog in ports. Apache logs to cronolog via a
pipe and cronolog will do rotation for you without needing to restart
Apache.
Cheers
Phil
More information about the freebsd-stable
mailing list