log rotation on windows?

Nuno Magalhães nunomagalhaes at eu.ipp.pt
Wed Aug 25 21:20:23 MSD 2010


Hi

On Wed, Aug 25, 2010 at 13:06, Arthur Blake <arthur.blake at gmail.com> wrote:
>  On Linux, which command is better to rotate log files?

The Debian package installs this file: /etc/logrotate.d/nginx:
/var/log/nginx/*.log {
	daily
	missingok
	rotate 52
	compress
	delaycompress
	notifempty
	create 640 www-data adm
	sharedscripts
	postrotate
		[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
	endscript
}

So, in this case, kill. logrotate gets run by cron every now and then,
your only concern is cleaning logfiles (if your disk is small).

HTH,
Nuno



More information about the nginx mailing list