【问题标题】:Apache equivalent of Nginx `proxy_buffering off`Apache 相当于 Nginx `proxy_buffering off`
【发布时间】: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 中找到的唯一配置是ProxyIOBufferSizeProxyReceiveBufferSize,但它们有一个最小值,而不是禁用缓冲的选项。我用这些进行了测试,但我的应用程序失败了。

【问题讨论】:

  • 你知道如何在 Apache 中设置 proxy_buffering 吗?
  • @spuder 我最终改用了 HAProxy。
  • 你的 Nginx 是什么版本的?

标签: apache nginx reverse-proxy mod-proxy


【解决方案1】:

flushpackets=on 表示在发送每个块后刷新缓冲区

此示例来自 guacamole 文档:https://guacamole.apache.org/doc/gug/proxying-guacamole.html#proxying-with-apache

<Location /guacamole/>
    Order allow,deny
    Allow from all
    ProxyPass http://HOSTNAME:8080/guacamole/ flushpackets=on
    ProxyPassReverse http://HOSTNAME:8080/guacamole/
</Location>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-17
    • 2010-09-23
    • 2019-01-21
    相关资源
    最近更新 更多