Sunday, November 1, 2009

configure logrotate on cPanel (daily rotation and 7 days retention).

vi /etc/logrotate.d/httpd

/usr/local/apache/logs/*.log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}

No comments:

Post a Comment