hi,all<br>I found the way of the log rotation is below. And during the period between &quot;mv&quot; and &quot;kill&quot;,  some logs will be lost because of the file doesn&#39;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&amp;action=edit&amp;section=1" title="Edit section: Log Rotation"></a></span><span class="mw-headline"></span>
<p>nginx will re-open it&#39;s logs in response to the USR1 signal.
</p>
<pre>$ mv access.log access.log.0<br>$ kill -USR1 &lt;code&gt;cat master.nginx.pid&lt;/code&gt;<br>$ sleep 1<br>$ gzip access.log.0    # do something with access.log.0<br></pre><br>