add logrotate config

This commit is contained in:
Edi Septriyanto
2020-05-15 00:39:39 +07:00
parent c65828c346
commit b2d0ea7e3e

18
etc/logrotate.d/nginx Normal file
View File

@@ -0,0 +1,18 @@
/var/log/nginx/*.log {
daily
missingok
rotate 14
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
}