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

I have my own server instance which is centos 5.7 and have installed apache some time ago. Now I noticed that my log files are rotating. I couldn't remember if I had set up something or not since there is nothing on cron, and the error logging on apache isn't piped.

Here's how error logging defined on one of the virtual hosts:

ErrorLog /etc/httpd/logs/

But when I go to the logs dir, I see the log files rotated in this manner:


I also noted that all the virtual hosts had the same number of rotated logs (4), and creates one every 7 days, and that the #4 log is always 3 weeks in the past. Also, these log files rotate in this manner no matter how big or small the log file is.

So my question is, do you have any idea what kind of rotator this is? I just want to put it back to writing to a lone access_log file. Thanks.

share|improve this question
up vote 2 down vote accepted

It's the standard linux logrotate system that is doing this.

Files of interest will be: /etc/logrotate.conf, /etc/logrotate.d/httpd, and also /etc/cron.daily/logrotate.

share|improve this answer
cool thanks, im kinda confused with size/minsize + the weekly option. which between size and minsize should i use if i want to skip the weekly log rotation if it hasn't reached 10MB yet? – voldomazta Dec 21 '11 at 3:01

you must delete the /etc/cron.daily/logrotate to stop working of log rotator when you show

access_log- which means today's access log

access_log.1.gz means zipped version of yesterday access log and so on

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.