Logrotating the log files

José Parrella joseparrella at gmail.com
Sat Jan 20 14:41:48 MSK 2007


Jeremy Hubert escribió:
> So.. any tips? Has anyone else done this?

This is the logrotate file that we use in nginx's Debian package. Note
that the root:adm permissions might need further revision in your own
system, as well as the logs and pid file location. I hope it helps.

<snip>
/var/log/nginx/*.log {
        daily
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        create 640 root adm
        sharedscripts
        postrotate
                [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat
/var/run/nginx.pid`
        endscript
}
</snip>

-- 
José M. Parrella -> Debian Sid, k2.6.18
Escuela de Ingenieria Electrica
Universidad Central de Venezuela -> ucvlug.info





More information about the nginx mailing list