我有一个应用程序,要求我在反向代理中禁用缓冲。我设法使用以下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
,但它们具有最小值而不是禁用缓冲的选项。我测试了那些,但我的应用程序失败了。
答案 0 :(得分:0)
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>