Empty error and access log
krishna
nginx-forum at forum.nginx.org
Thu Sep 26 11:25:45 UTC 2019
Hi Francis,
Thanks for the reply.
logrotate has been used to archive the nginx log files on daily basis from
the machine and below is the configuration.
Once it has been executed, the files would get zipped in gzip format and new
files would get created (as killing the nginx PID, further the nginx log
will be generated).
/var/nginx/logs/*log
{
daily
rotate 20
missingok
notifempty
compress
sharedscripts
postrotate
/usr/bin/kill -USR1 `cat /var/pid/nginx.pid 2>/dev/null` 2>/dev/null ||
true #PID file for nginx
endscript
}
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,285708,285715#msg-285715
More information about the nginx
mailing list