My Favorite Logrotate Setup
By Lance Gliser
Published:
![Lance Gliser](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flance-gliser.2d1d9486.jpg&w=256&q=75)
Heads up! This content is more than six months old. Take some time to verify everything still works as expected.
/var/www/vhosts/{vhost}/log/*log { daily missingok notifempty dateext copytruncate create 570 apache www-data olddir /var/www/vhosts/{vhost}/log/old rotate 365 maxage 365 compress delaycompress }
You can test if this will run using...
sudo logrotate -dv /etc/logrotate/{file}