美文网首页
nginx 记录 post的数据

nginx 记录 post的数据

作者: 小鬼No1 | 来源:发表于2017-04-28 08:09 被阅读0次

在nginx的log_format设置中增加request_body

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" "$request_time" "$request_body"';

由于我们的项目是使用的proxy_pass,所以直接开启这个即可,如果不是这种方式,还需要lua脚本的支持才可以。

相关文章

网友评论

      本文标题:nginx 记录 post的数据

      本文链接:https://www.haomeiwen.com/subject/eylozttx.html