Comment 27 for bug 1450770

Revision history for this message
Claudio Kuenzler (napsty) wrote :

Seems this issue still exists (or again) in Xenial.

$ dpkg -l|grep logrotate | awk '{print $1" "$2" "$3}'
ii logrotate 3.8.7-2ubuntu2

$ dpkg -l|grep nginx | awk '{print $1" "$2" "$3}'
ii nginx 1.10.0-0ubuntu0.16.04.2
ii nginx-common 1.10.0-0ubuntu0.16.04.2
ii nginx-core 1.10.0-0ubuntu0.16.04.2

$ cat /etc/logrotate.d/nginx
/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
}