My Favorite Logrotate Setup

  1. /var/www/vhosts/{vhost}/log/*log {
  2.     daily
  3.     missingok
  4.     notifempty
  5.     dateext
  6.     copytruncate
  7.     create 570 apache www-data
  8.     olddir /var/www/vhosts/{vhost}/log/old
  9.     rotate 365
  10.     maxage 365
  11.     compress
  12.     delaycompress
  13. }

You can test if this will run using...
  1. sudo logrotate -dv /etc/logrotate/{file}
Tags: