<span style="color: rgb(0, 0, 0);">Wow I never knew that could be done with nginx! Thanks a lot </span><span style="color: rgb(0, 0, 0);" class="gI"><span class="gD">立冰</span></span><span style="color: rgb(0, 0, 0);"> and Jim for your help, learnt a lot.</span><br style="color: rgb(0, 0, 0);">

<br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">I never came upon <a href="http://wiki.nginx.org/NginxCommandLine">http://wiki.nginx.org/NginxCommandLine</a> before by browsing through the wiki, where exactly is it linked from?</span><br>

<br>Ray.<br><br><div class="gmail_quote">On Tue, Sep 1, 2009 at 11:23 AM, Jim Ohlstein <span dir="ltr">&lt;<a href="mailto:jim@ohlste.in">jim@ohlste.in</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im">Ray wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Is there any way other than killing/restarting the nginx processes?  Am asking this because it seemed to me that nginx shouldn&#39;t need to be restarted for it to use the new log file, if I didn&#39;t read the wiki wrongly.<br>


</blockquote></div>
The &quot;kill&quot; command doesn&#39;t kill the process. It merely sends a signal to it, in this case &quot;USR1&quot; which re-opens the log file.<br>
<br>
See <a href="http://wiki.nginx.org/NginxCommandLine#Controlling_Nginx_Via_the_Signals" target="_blank">http://wiki.nginx.org/NginxCommandLine#Controlling_Nginx_Via_the_Signals</a> .<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Ray.<div class="im"><br>
<br>
On Tue, Sep 1, 2009 at 10:11 AM, Jim Ohlstein &lt;<a href="mailto:jim@ohlste.in" target="_blank">jim@ohlste.in</a> &lt;mailto:<a href="mailto:jim@ohlste.in" target="_blank">jim@ohlste.in</a>&gt;&gt; wrote:<br>
<br>
    Ray wrote:<br>
<br>
        Am trying to configure for logfile rotation using logrotate<br>
        with nginx (0.7.61).  As the logrotate script runs, the old<br>
        logfile is renamed and a new one is created, but nginx still<br>
        writes to the old (renamed) logfile even with<br>
        open_log_file_cache set to off according to<br>
        <a href="http://wiki.nginx.org/NginxHttpLogModule#open_log_file_cache" target="_blank">http://wiki.nginx.org/NginxHttpLogModule#open_log_file_cache</a><br>
<br>
        Is there anything that I&#39;m missing out?<br>
<br>
        Ray.<br>
<br>
    kill -USR1 `cat /path/to/nginx.pid`<br>
<br>
<br>
</div></blockquote><font color="#888888">
Jim<br>
<br>
<br>
</font></blockquote></div><br>