ProxyPass失败:WebSocket握手期间错误:意外的响应代码:500

mua*_*aaz 5 php sockets web-services proxypass

我已经在PHP / Apache上编写了WebSocket服务器。我使用mod_proxy_wstunnel使WebSocket安全。因此,用户连接到WSS://socket.domain.com,请求被重定向到(WS)协议,例如:ws://10.21.55.2:12345 /我正在使用代理服务器通行证,只是因为该页面是通过HTTPS和WwebSocket加载的是WS协议。

这是我如何重定向WSS ==> WS socket.domain.com

ProxyPass / ws://10.21.55.2:12345
Run Code Online (Sandbox Code Playgroud)

但是上面的代码给出了500 Internal Server Error。我不知道为什么会这样。在重新启动系统之前,它一直在工作。

这是错误日志

AH01144: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
Run Code Online (Sandbox Code Playgroud)

Luc*_*cci 2

您可能需要添加 mod proxy_wstunnel a2enmod proxy_wstunnel