windowsnginxsignalsloggingrotation

log rotation for nginx on windows


I've found plenty of references on the web for rotating the nginx logs under linux.. just send the USR1 signal to the process. But... unix like signals don't exist on windows and I haven't been able to find any information on this. How can I accomplish the same thing with nginx on windows??


Solution

  • Actually (despite tons of googling) the answer can be found squarely in the doc pages. The command is nginx -s reopen but this only seems to work when running nginx from the command line – currently the only official way to run nginx on Windows at this time.

    My next challenge is to figure out how to make this work when running nginx as a windows service as described in the answers to Run nginx as a Windows service.