Skip to content

Instantly share code, notes, and snippets.

@a2f0
Last active December 19, 2015 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a2f0/6032220 to your computer and use it in GitHub Desktop.
Save a2f0/6032220 to your computer and use it in GitHub Desktop.
nginx logrorate
/var/log/nginx/*.log {
daily
compress
delaycompress
rotate 7
missingok
sharedscripts
postrotate
test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid`
touch /opt/rails/asap/app/2014/current/tmp/restart.txt
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment