是否可以通过双重反向代理反向代理ws / wss连接

时间:2019-10-06 02:44:07

标签: apache websocket proxy

我目前在两台不同的计算机上使用apache进行了双重反向代理设置。我能够加倍反向代理HTTP / https请求,但是我似乎无法弄清楚如何加倍反向代理ws / wss连接。

  • mod_proxy和mod_proxy_wstunnel已安装。

  • 当前设置适用于http / https的双向反向代理

相关的虚拟主机文件机#1:

<Virtual Host *:443>
...
 # keep the host
        ProxyPreserveHost on
        ProxyPass / https://office.domin.com/
        ProxyPassReverse / https://office.domain.com/
...
</Virtual Host>

相关的虚拟主机文件机2:

<Virtual Host *:443>
...
  # Main websocket
  ProxyPassMatch "/lool/(.*)/ws$" ws://127.0.0.1:9980/lool/$1/ws nocanon

  # Admin Console websocket
  ProxyPass /lool/adminws ws://127.0.0.1:9980/lool/adminws
...
</Virtual Host>

当前,我在第二个反向代理处收到此错误:

No protocol handler was valid for the URL /lool/https:%2F%2Fnextcloud.domain.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F556_ocny42d5quk3?access_token=SKmS4iNVHMtrSXO5HMLxLgLhyYXwW0Go&access_token_ttl=0&reuse_cookies=__cfduid%3Dda2e1a65d46c24e8c68be4a16c0f0d6f01570281507&permission=edit/ws (scheme 'ws'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule

我已阅读以下内容:WebSocket through SSL with Apache reverse proxy

上面的链接未完全描述我想要做什么。我什至不确定是否有可能为ws / wss运行两个连续的代理。

0 个答案:

没有答案