Skip to content

Instantly share code, notes, and snippets.

@bingooyong
Created June 28, 2018 03:07
Show Gist options
  • Save bingooyong/16a08e0aefbe459694b19a0f5c248380 to your computer and use it in GitHub Desktop.
Save bingooyong/16a08e0aefbe459694b19a0f5c248380 to your computer and use it in GitHub Desktop.
# /etc/logrotate.d/openresty
# logrotate -d -f /etc/logrotate.d/openresty
/usr/local/openresty/nginx/logs/*log {
create 0644 nginx nginx
daily
rotate 7
missingok
notifempty
compress
sharedscripts
dateext
postrotate
/bin/kill -USR1 `cat /usr/local/openresty/nginx/logs/nginx.pid 2>/dev/null` 2>/dev/null || true
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment