Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2005 10:09:55 +0800
From:      Calvin OnEarth <hangdog@gmail.com>
To:        Philip Murray <pmurray@nevada.net.nz>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Rotating web server logs without restarting Apache
Message-ID:  <dc3ae0fb0511241809y64574593h653c9c9047fa4dd9@mail.gmail.com>
In-Reply-To: <11EEE0FE-A7DC-4585-BF05-6FE3B73D5D97@nevada.net.nz>
References:  <200511250845.43542.distro.watch@msa.hinet.net> <11EEE0FE-A7DC-4585-BF05-6FE3B73D5D97@nevada.net.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
My very non-orthodox way is to:-
1)  copy the entire content of the log file out for storage, renamed
according to date.
2)  cat /dev/null to the apache logfile


On 11/25/05, Philip Murray <pmurray@nevada.net.nz> wrote:
> 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



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