/var/log/nginx/*log {
    daily
    rotate 10
    missingok
    notifempty
    compress
    sharedscripts
    postrotate
        # USR1 forcing reopening of log file to prevent "holding" it after logrotate
        [ ! -f /run/nginx.pid ] || kill -USR1 "$(cat /run/nginx.pid)"
    endscript
}

