Created
January 18, 2017 21:25
-
-
Save kirsle/10f946abdd5fdd65a263a117a7cc185a to your computer and use it in GitHub Desktop.
Rotate nginx per-user log files
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
/home/*/logs/*.log { | |
daily | |
missingok | |
rotate 14 | |
size 50M | |
compress | |
delaycompress | |
notifempty | |
create 0640 www-data adm | |
sharedscripts | |
prerotate | |
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ | |
run-parts /etc/logrotate.d/httpd-prerotate; \ | |
fi \ | |
endscript | |
postrotate | |
invoke-rc.d nginx rotate >/dev/null 2>&1 | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment