Logrotate, is this a proper config for what I want to do?
- by Felthragar
I started using logrotate a few days ago on a new server setup (actually three of them). My config is as follows.
/var/www/mywebsite.com/logs/*.log {
rotate 14
daily
dateext
compress
delaycompress
sharedscripts
postrotate
/usr/sbin/apache2ctl graceful > /dev/null
endscript
}
Problem is that this is putting several days of logs into the same file. For example, I've currently got a file called access.log-20121005 which has logs for Oct 3rd, Oct 4th and Oct 5th in it. Is that proper behaviour? What I want for it to do is to create one logfile for each day and keep 14 days of logs.
Any help appreciated, thanks.