log rotation on windows?

Igor Sysoev igor at sysoev.ru
Wed Aug 25 16:31:17 MSD 2010

On Wed, Aug 25, 2010 at 08:06:41AM -0400, Arthur Blake wrote:

> I found the ultimate solution to my problem:  Switch to Linux :)

Yes, Linux is much more preferable than Windows for nginx.

> One more question:  On Linux, which command is better to rotate log files?
> nginx -s reopen
> or
> kill -USR1 <nginx-pid>
> I think using nginx -s reopen is better because its more clear and you don't
> have to grab the pid.  On the other hand, using kill may be more unixy and
> work better with some existing system rotation scripts.  But I think that's
> moot anyway because using the USR1 signal to rotate logs is not really
> standard.  It probably doesn't really matter.  I'm thinking that using kill
> to rotate the logs is just sort of a "legacy" way of doing it before the -s
> reopen option was added...

We usually use the kill. "nginx -s reopen" has to grab the pid using
nginx.conf, because it needs to know master process pid.

Igor Sysoev

More information about the nginx mailing list