Last active
August 6, 2019 07:36
-
-
Save lesstif/317a11a9f9de5db38d36e8fd78c72b2e to your computer and use it in GitHub Desktop.
log roate script for nginx(/etc/logrotate.d/nginx)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/nginx/*.log { | |
daily | |
missingok | |
rotate 52 | |
compress | |
delaycompress | |
notifempty | |
create 640 nginx adm | |
sharedscripts | |
postrotate | |
if [ -f /var/run/nginx.pid ]; then | |
kill -USR1 `cat /var/run/nginx.pid` | |
fi | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment