nginx logfile rotation
gunblad3 at gmail.com
Tue Sep 1 07:35:14 MSD 2009
Wow I never knew that could be done with nginx! Thanks a lot 立冰 and Jim for
your help, learnt a lot.
I never came upon http://wiki.nginx.org/NginxCommandLine before by browsing
through the wiki, where exactly is it linked from?
On Tue, Sep 1, 2009 at 11:23 AM, Jim Ohlstein <jim at ohlste.in> wrote:
> Ray wrote:
>> Is there any way other than killing/restarting the nginx processes? Am
>> asking this because it seemed to me that nginx shouldn't need to be
>> restarted for it to use the new log file, if I didn't read the wiki wrongly.
> The "kill" command doesn't kill the process. It merely sends a signal to
> it, in this case "USR1" which re-opens the log file.
> http://wiki.nginx.org/NginxCommandLine#Controlling_Nginx_Via_the_Signals .
>> On Tue, Sep 1, 2009 at 10:11 AM, Jim Ohlstein <jim at ohlste.in <mailto:
>> jim at ohlste.in>> wrote:
>> Ray wrote:
>> Am trying to configure for logfile rotation using logrotate
>> with nginx (0.7.61). As the logrotate script runs, the old
>> logfile is renamed and a new one is created, but nginx still
>> writes to the old (renamed) logfile even with
>> open_log_file_cache set to off according to
>> Is there anything that I'm missing out?
>> kill -USR1 `cat /path/to/nginx.pid`
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx