Published December 18th, 2002 by Jim O'Halloran

Apache 2 Log Rotations

I’ve been having problems with Apache 2 segfaulting when the Red Hat Log Rotation job is run… /etc/logrotate.d/apache has been changed as follows to try and resolve this…

/var/log/httpd/*_log {
        monthly
        rotate 12
        missingok
        prerotate
        /usr/local/apache2/bin/apachectl stop
        endscript
        postrotate
        /usr/local/apache2/bin/apachectl start
        endscript
        }

I’ve added the prerotate and postrotate lines to shut down apache while the logs are being moved, so hopefully this will resolve the problem.

UPDATE (1/1/03): Had the path to apachectl wrong, now fixed in the above.


0 Responses to “Apache 2 Log Rotations”

Feed for this Entry
  1. No Comments

Leave a Reply

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>