Subject: Re: What is the best way to rotate NGINX log files ?
Date: Wednesday 5th December 2007 18:56:21 UTC (over 10 years ago)
On Wed, Dec 05, 2007 at 10:41:30AM -0800, Mansoor Peerbhoy wrote: > I have a question. What's the best way to rotate the NGINX log file ? We run NGINX as a Mail Proxy, and the log file grows quite large because we don't restart it very frequently. > > Are there any alternatives to simply killing the NGINX process, zipping up the error log, and then restarting NGINX ? Of course! mv error.log error.log.0 kill -USR1 `cat master.nginx.pid` wait 1 second and do anything with log -- Igor Sysoev http://sysoev.ru/en/