【发布时间】:2018-04-04 14:49:05
【问题描述】:
我有一个 nginx 作为代理,uWSGI 作为应用服务器。我想将任何 http 标头添加到 uwsgi 日志中。我可以在日志中添加一些var.VAR_NAME。
通过文档 (http://uwsgi-docs.readthedocs.io/en/latest/LogFormat.html):
%(var.XXX) -> 请求变量 XXX 的内容(如 var.PATH_INFO,可从 1.9.21)
但这仅适用于来自 nginx 的 uwsgi_param,不适用于 proxy_set_header 或 smt。像这样。
【问题讨论】:
标签: nginx logging http-headers uwsgi