Skip to content

Instantly share code, notes, and snippets.

@kmayer
Created October 28, 2009 02:23
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 kmayer/220190 to your computer and use it in GitHub Desktop.
Save kmayer/220190 to your computer and use it in GitHub Desktop.
/var/log/nginx/*.log { daily
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
/usr/bin/s3cmd -c /var/www/.s3cfg put /var/log/nginx/access.log.1 s3://my-bucket/input/`date -u "+%Y%m%d"`/access.log.`date -u "+%Y%m%d%H%M.%S"`
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment