diff --git a/conf/logrotate/nginx b/conf/logrotate/nginx new file mode 100644 index 0000000000000..1dd4d29287879 --- /dev/null +++ b/conf/logrotate/nginx @@ -0,0 +1,21 @@ +/var/log/nginx/*.log { + daily + missingok + rotate -1 + # remove after two years + maxage 730 + 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 +}