Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/etc/logrotate.d/vhost-my.app
/var/www/vhosts/my.app/storage/logs/*.log {
size 100M # Max log file size 100M
weekly # Rotate weekly, if not sooner
missingok # Ignore if missing file
rotate 12 # Keep 12 files
compress # Compress rotated files
notifempty # Ignore empty files
create 755 www-data www-data # Create new log file with perms and owner
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment