Skip to content

Instantly share code, notes, and snippets.

@intarstudents
Created March 25, 2013 19:23
Show Gist options
  • Save intarstudents/5239852 to your computer and use it in GitHub Desktop.
Save intarstudents/5239852 to your computer and use it in GitHub Desktop.
Nginx logrotate
/var/log/path/to/nginx/*_log {
daily
missingok
rotate 20
compress
delaycompress
notifempty
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