Skip to content

Instantly share code, notes, and snippets.

@kirsle kirsle/nginx-custom
Created Jan 18, 2017

Embed
What would you like to do?
Rotate nginx per-user log files
/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
You can’t perform that action at this time.