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

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to