It seems like the access logs on this particular apache2 server I'm running are truncated every day at midnight. I'd rather this be done once a week instead of once a day but am not sure where this is currently being done.
Any ideas?
Normally log rotation is managed by the logrotate utility which run by cron|anacron via the /etc/cron/daily/logrotate
script.
The logrotate utility has a configuration file /etc/logrotate.conf
which contains defaults for all logrote jobs. These defaults can be modified by the contents of scripts in /etc/logrotate.d
.
On CentOS for example anacron
(via /etc/anacrontab) runs /etc/cron.daily/logrotate
which reads the /etc/logrotate.conf
directives which are added to/overridden by the contents of the /etc/logrotate.d/httpd
.
Ubuntu is pretty much the same except cron runs the /etc/cron.daily/logrotate script via the directives in /etc/crontab
.
Log
directives