1 设置 nginx access.log 格式
log_format main '$time_local|$proxy_add_x_forwarded_for|$request_method|$request_uri|$request_body|$http_referer'
'|$status|$request_time';
2 基于crontabe 的定时器脚本
mv access.log access.log.${date}
kill -USR1 $(cat nginx.pid)
It's done.