Skip to content

Instantly share code, notes, and snippets.

@valorin
Created January 17, 2016 21:24
Show Gist options
  • Save valorin/504161d48b43206ff9fe to your computer and use it in GitHub Desktop.
Save valorin/504161d48b43206ff9fe to your computer and use it in GitHub Desktop.
/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