Last active
December 31, 2021 09:17
-
-
Save gokure/a074fa4c73c37bb3f6f03938f78a2c98 to your computer and use it in GitHub Desktop.
logrotate example files, put files into /etc/logrotate.d/ directories.
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
/usr/local/openresty/nginx/logs/*.log { | |
weekly | |
missingok | |
rotate 52 | |
compress | |
delaycompress | |
notifempty | |
sharedscripts | |
postrotate | |
[ -e /usr/local/openresty/nginx/logs/nginx.pid ] && kill -USR1 `cat /usr/local/openresty/nginx/nginx.pid` | |
endscript | |
} |
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/php-fpm/*log { | |
missingok | |
notifempty | |
sharedscripts | |
delaycompress | |
postrotate | |
/bin/kill -SIGUSR1 `cat /run/php-fpm/php-fpm.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