Welcome! Log In Create A New Profile

Advanced

Re: Strange log file behavior

Grant
July 15, 2013 05:52AM
>> I noticed that most of my rotated nginx log files are empty (0 bytes).
>>
>> My only access_log directive is in nginx.conf:
>>
>> access_log /var/log/nginx/localhost.access_log combined;
>>
>> Also nginx is currently logging to
>> /var/log/nginx/localhost.access_log.1 instead of localhost.access_log.
>>
>> Does anyone know why these things are happening?
>
> This usually happens if someone don't ask nginx to reopen log
> files after a rotation. See here for details:
>
> http://nginx.org/en/docs/control.html#logs

I use logrotate:

/var/log/nginx/*_log {
missingok
sharedscripts
postrotate
test -r /run/nginx.pid && kill -USR1 `cat /run/nginx.pid`
endscript
}

Does it look OK?

- Grant

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Strange log file behavior

Grant July 14, 2013 07:46AM

Re: Strange log file behavior

Maxim Dounin July 14, 2013 02:22PM

Re: Strange log file behavior

Grant July 15, 2013 05:52AM

Re: Strange log file behavior

Maxim Dounin July 15, 2013 06:38AM

Re: Strange log file behavior

Grant July 15, 2013 06:44AM

Re: Strange log file behavior

Igor Sverkos July 15, 2013 08:54AM

Re: Strange log file behavior

Grant July 15, 2013 11:08AM

Re: Strange log file behavior

Grant July 18, 2013 08:50AM

Re: Strange log file behavior

Igor Sverkos July 18, 2013 09:16AM

Re: Strange log file behavior

Grant July 18, 2013 09:56AM

Re: Strange log file behavior

Maxim Dounin July 18, 2013 11:04AM

Re: Strange log file behavior

Grant July 18, 2013 11:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 127
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