Files
LEMPer/etc/logrotate.d/nginx
2021-12-11 03:28:53 +07:00

18 lines
415 B
Plaintext

/var/log/nginx/*.log /home/*/logs/nginx/*_log {
daily
rotate 3
compress
delaycompress
missingok
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
}