1

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/domain.com-access_log

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

/etc/httpd/logs/domain.com/access_log
/etc/httpd/logs/domain.com/access_log.1.gz
/etc/httpd/logs/domain.com/access_log.2.gz
/etc/httpd/logs/domain.com/access_log.3.gz
/etc/httpd/logs/domain.com/access_log.4.gz

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.

2 Answers 2

2

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.

1
  • 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, 2011 at 3:01
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .