【发布时间】:2020-09-20 05:15:03
【问题描述】:
我想要 haproxy 中的 nginx 配置。浏览了很多链接,但没有一个提到与以下配置相关的任何内容。
proxy_http_version 1.1;
proxy_set_header Connection "";
【问题讨论】:
-
您的实际问题是什么?
-
Haproxy 将请求转发到 http1.0 中的后端服务器,但我的后端服务器支持 http1.1 及更高版本。之前我能够使用带有 abv 配置的 nginx 来实现这一点,但不能使用 hap。我有简单的 hap 后端配置
backend tune server tune <ip>:443 check ssl verify none\n \n* HTTP 1.0, assume close after body < HTTP/1.0 503 Service Unavailable < Cache-Control: no-cache < Connection: close < Content-Type: text/html < <html><body><h1>503 Service Unavailable</h1> No server is available to handle this request. </body></html> * Closing connection 0
标签: nginx reverse-proxy haproxy http-1.1