1

I'm using Apache 2.4.27. I need to tunnel a client's wss request through an Apache reverse-proxy, to a backend server. However, from a tcpdump, it appears the wss request is being rejected by the Apache server. So I'm trying to debug this first hop.

The client issues a wss request:

wss://apache-server/wss/app

The Apache error_log displays:

AH01144: No protocol handler was valid for the URL /wss/app. If you are 
using a DSO version of mod_proxy, make sure the proxy submodules are
included in the configuration using LoadModule.

Meanwhile, in my httpd_access_log:

HTTP/1.1 "GET /wss/app HTTP/1.1" 500 528

It seems, Apache is interpreting it as a HTTP/1.1 GET request and not wss. Could this be true?

I need Apache to accept the wss connection and relay/tunnel it to a backend server.

Is Apache 2.4.27 able to accept wss connections? Do I need some other protocol module that is not bundled with Apache 2.4.27? [I saw Apache-WebSocket, but it is 6 years old, so I'm guessing it is defunct.]

Any suggestions to further debug this will also be greatly appreciated.

PS: I have loaded: mod_proxy, mod_proxy_wstunnel, mod_proxy_http, mod_proxy_html, mod_proxy_connect, mod_proxy_ajp, and a bunch of others.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Matt Muggeridge
  • 153
  • 1
  • 1
  • 10
  • The initial websocket connection comes as an HTTP GET request with an Upgrade header, which apparently Apache isn't interpreting. See Protocol Handshake in [Websocket](https://en.m.wikipedia.org/wiki/WebSocket). – Andrew Schulman Mar 09 '18 at 10:21
  • Please show your ProxyPass and ProxyPassReverse statements. – Andrew Schulman Mar 09 '18 at 10:23
  • After much head scratching and your initial comment about "Apache isn't interpreting", I put a check and found the wstunnel was not loading! I corrected that, and the tunnel started working. Now I'm onto my next issue... sessions clobbering each other. Thanks for your input Andrew, it helped! – Matt Muggeridge Mar 12 '18 at 20:05

0 Answers0