在http段加上
log_format access '$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 logs/post.access.log access;
不要后面的access不会输出