Skip to content

Instantly share code, notes, and snippets.

@pcdinh
Created December 8, 2009 16:10
Show Gist options
  • Save pcdinh/251759 to your computer and use it in GitHub Desktop.
Save pcdinh/251759 to your computer and use it in GitHub Desktop.
/usr/local/apache2/logs/*log {
daily
rotate 9
missingok
notifempty
sharedscripts
prerotate
webalizer -c /usr/local/webalizer/etc/webalizer.conf
endscript
postrotate
/bin/kill -HUP `cat /usr/local/apache2/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
lastaction
yesterday=ac$(date -d yesterday +%y%m%d).log; logdir=/var/log/httpd; mv ${logdir}/access_log.1 ${logdir}/old/${yesterday}
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment