【发布时间】:2020-02-04 03:44:09
【问题描述】:
我在我的应用程序中使用 nginx 作为反向代理。我有一个 geth attach 的用例。 用户可以通过 geth attach https://dns-name:port/api-key 来获取 geth 控制台。 示例:
如果出现错误,nginx error_log 会显示此 apikey。 示例:
11:32:14 [错误] 48#0: *12479669 connect() 失败(111:连接 拒绝)同时连接到上游,客户端:1*4.***.****.*01, 服务器:_,请求:“POST /api-key HTTP/1.1”,
上游:“http://127.0.0.1:******”,主机:“*******.******.****.com:port”
我阅读了 nginx 文档,没有办法为 error_log 使用日志格式。 有没有办法配置这个error_log。我不想在日志中显示这个 api-key。
【问题讨论】:
标签: nginx reverse-proxy