在nginx.conf 中 http节点中 添加如下代码
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent $request_body "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for'; access_log off;
在网站配置文件中 server 节点下 在原来成功日志保存路径结尾 添加main 启用。
access_log /www/wwwlogs/zyf.wanguopai.cn.log; ##更改如下 access_log /www/wwwlogs/zyf.wanguopai.cn.log main;