Skip to content

Instantly share code, notes, and snippets.

@caferrari
Created January 25, 2013 17:39
Show Gist options
  • Save caferrari/4636376 to your computer and use it in GitHub Desktop.
Save caferrari/4636376 to your computer and use it in GitHub Desktop.
/etc/logrotate.d/nginx
/var/log/nginx/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment