nginx.conf http { } 里面找位置 加上 $request_body

log_format youName ‘$remote_addr – $remote_user [$time_local] “$request” $status $body_bytes_sent $request_body “$http_referer” “$http_user_agent” $http_x_forwarded_for’;

server 添加访问日志输出

access_log /www/nginx.log youName; # yourName换成你直接的,记得要一一对应 特别是你设置的名字