Disable log rotation for apache or move file location
Posted
by vittocia
on Server Fault
See other posts from Server Fault
or by vittocia
Published on 2010-03-15T00:07:14Z
Indexed on
2010/03/15
0:10 UTC
Read the original article
Hit count: 232
I need to change the log retention for apache, currently is seems to be running on the default from logrotate.conf which is weekly. It creates 'access_log.1' 'access_log.2' and so on for each week. The problem is it deletes the last log file every week, 'access_log.5', I need the logs to keep going infinitely instead of the last log being deleted every week. It seems to be running on the default value from logrotate.conf - I don't want to change the default values held in that file, so I assume there is a way to change the retention using the /etc/logrotate.d/httpd file?
the contents are as follows:
/var/log/httpd/*log {
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}
what can I add/change to stop the last log being deleted every week?
© Server Fault or respective owner