hi,all<br>I found the way of the log rotation is below. And during the period between "mv" and "kill", some logs will be lost because of the file doesn't exist any more.<br>Is there any good ways?<br>
<br>thanks<br><br><span class="editsection"><a href="http://wiki.nginx.org/index.php?title=NginxLogRotation&action=edit&section=1" title="Edit section: Log Rotation"></a></span><span class="mw-headline"></span>
<p>nginx will re-open it's logs in response to the USR1 signal.
</p>
<pre>$ mv access.log access.log.0<br>$ kill -USR1 <code>cat master.nginx.pid</code><br>$ sleep 1<br>$ gzip access.log.0 # do something with access.log.0<br></pre><br>