What is the best way to rotate NGINX log files ?
mansoor at zimbra.com
Sat Dec 8 11:40:17 MSK 2007
Thank you, Igor !
----- Igor Sysoev <is at rambler-co.ru> wrote:
| 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
More information about the nginx