Answers:
/etc/logrotate.d/nginx
/var/log/nginx/access_log {
rotate 7
size 5k
dateext
dateformat -%Y-%m-%d
missingok
compress
sharedscripts
postrotate
test -r /var/run/nginx.pid && kill -USR1 `cat /var/run/nginx.pid`
endscript
}
man logrotate
有关其他详细信息。
sudo logrotate -v -f /etc/logrotate.d/nginx
logrotate
?