Welcome! Log In Create A New Profile

Advanced

Re: nginx logfile rotation

Jim Ohlstein
September 02, 2009 05:49PM
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.

See
http://wiki.nginx.org/NginxCommandLine#Controlling_Nginx_Via_the_Signals .
>
> Ray.
>
> On Tue, Sep 1, 2009 at 10:11 AM, Jim Ohlstein <jim@ohlste.in
> <mailto:jim@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
> http://wiki.nginx.org/NginxHttpLogModule#open_log_file_cache
>
> Is there anything that I'm missing out?
>
> Ray.
>
> kill -USR1 `cat /path/to/nginx.pid`
>
>
Jim
Subject Author Posted

nginx logfile rotation

Ray September 02, 2009 05:49PM

Re: nginx logfile rotation

Jim Ohlstein September 02, 2009 05:49PM

Re: nginx logfile rotation

Ray September 02, 2009 05:49PM

Re: nginx logfile rotation

Jim Ohlstein September 02, 2009 05:49PM

Re: nginx logfile rotation

Ray September 02, 2009 05:49PM

Re: nginx logfile rotation

Jim Ohlstein September 02, 2009 05:49PM

Re: nginx logfile rotation

Cliff Wells September 02, 2009 05:49PM

Re: nginx logfile rotation

张立冰 September 02, 2009 05:49PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready