Created
June 12, 2023 15:14
-
-
Save TGion/6341629316cc0d42b6cffa1929bfc5f1 to your computer and use it in GitHub Desktop.
Newsyslog logrotation for nginx services
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
# Nextcloud | |
# [logfile name] [owner-group] [mode] [count] [size] [when] [flags] [path to pid file] [signal] | |
/var/log/nextcloud/nextcloud.log www:www 640 9 * $D00 BCEJN | |
# Modsecurity | |
# Workaround for logrotation on modsecurity to restart nginx - otherwise new logs are not written | |
# https://github.com/SpiderLabs/ModSecurity-nginx/issues/121 | |
# | |
# [logfile name] [owner-group] [mode] [count] [size] [when] [flags] [path to pid file] [signal] | |
/var/log/modsecurity/modsec_audit.json www:www 640 9 * $D00 BCEJR /usr/local/sbin/nginx.restart | |
# NGINX | |
# [logfile name] [owner-group] [mode] [count] [size] [when] [flags] [path to pid file] [signal] | |
/var/log/nginx/access.log www:www 640 9 * $D00 BCEJ /var/run/nginx.pid SIGHUP | |
/var/log/nginx/error.log www:www 640 9 * $D00 BCEJ /var/run/nginx.pid SIGHUP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment