Rotating apache logs

Jason Holtzapple ml at bitflip.net
Fri Jun 25 16:11:21 MST 2010


On 06/25/2010 04:03 PM, Eric Shubert wrote:
> It appears that there are 2 ways of rotating apache logs.
> 
> Logrotate can be used, in which case apache needs to be restarted after
> the logs are rotated.

Yes, but this is usually a graceful restart, at least.

> There is also a rotatelogs program included with apache that controls
> log rotation (http://httpd.apache.org/docs/2.2/programs/rotatelogs.html).
> 
> Does anyone have a preference, or know which is considered to be best
> practice? I'm inclined to lean toward the later.

I've always used the system log rotator (logrotate, logadm, etc). If
you're concerned about the effects of a restart you could try
logrotate's copytruncate option.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20100625/48193291/attachment.pgp>


More information about the PLUG-discuss mailing list