【发布时间】:2018-09-28 10:32:04
【问题描述】:
如果我的请求有超过 1 个的 x-forwarded-host 标头,我通过 K8 入口向 Apache 请求时收到 400 错误请求
www.a.com, www.b.com
我从这个请求中记录 Apache,Apache 使用 x-forwarded-host 作为主机名。 Apache 日志是这样的
[core:debug] [pid 18] vhost.c(796): [client 172.17.0.7:51726] AH02415: [strict] Invalid host name 'www.a.com,www.b.com', 问题附近:,www.b
[core:debug] [pid 18] vhost.c(891): [client 172.17.0.7:51726] AH00550:客户端发送的主机头格式错误:www.a.com,www.b.com
[core:debug] [pid 18] protocol.c(1393): [client 172.17.0.7:51726] AH00569: 客户端发送的 HTTP/1.1 请求没有主机名(参见 RFC2616 第 14.23 节):/ [headers:debug] [pid 18] mod_headers.c(900): AH01503: headers: ap_headers_error_filter() 172.17.0.5:80 172.17.0.7 - - [28/Sep/2018:10:27:44 +0000] "GET / HTTP/1.1" 400 0 "-" ""
我必须配置 Apache 不要使用 x-forward-host 作为主机名。我如何在 Apache 中配置它?
【问题讨论】:
标签: apache kubernetes