【发布时间】:2015-07-18 10:17:17
【问题描述】:
我有一个应用程序要求我禁用反向代理中的缓冲。我设法通过以下 nginx 配置做到了这一点:
server {
listen 80;
server_name 10.0.0.104;
location / {
proxy_buffering off;
proxy_request_buffering off;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://http_backend;
proxy_redirect default;
}
}
upstream http_backend {
server 10.0.0.86:8080;
keepalive 16;
}
我需要在 Apache 上使用相同的设置,但 apache 没有 proxy_buffering off 指令。我能在mod_proxy docs 中找到的唯一配置是ProxyIOBufferSize 和ProxyReceiveBufferSize,但它们有一个最小值,而不是禁用缓冲的选项。我用这些进行了测试,但我的应用程序失败了。
【问题讨论】:
-
你知道如何在 Apache 中设置 proxy_buffering 吗?
-
@spuder 我最终改用了 HAProxy。
-
你的 Nginx 是什么版本的?
标签: apache nginx reverse-proxy mod-proxy