Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From what i found on the web, "the way" to make Apache2 use rolling log files is to write a cron job that stop apache, rolls the log file, and starts it again.

Is there a saner way that doesn't force an apache shutdown?

share|improve this question
up vote 3 down vote accepted

You didn't specify what operating system, so I'm going to assume you're on a Linux system. In CentOS, the logrotate "daemon" already has this written out for you. When it rotates the log, it uses the httpd reload command, which to my understanding does not exit the apache process, meaning no requests are rejected during that short interval. Try and look in /etc/logrotate.d/httpd for the rules. If that file doesn't exist, you can easily make one based off of any of the other rules you'll find in the logrotate.d folder.

share|improve this answer
Thanks - I'm using Ubuntu, and I found the config in /etc/logrotate.d/apache2 – ripper234 Nov 7 '11 at 16:31

You can use Piped Logs as described here: Piped Logs

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.