httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Hörsken <i...@marc-hoersken.de>
Subject Re: [users@httpd] Weird connection issues with mod_proxy_wstunnel
Date Fri, 17 Apr 2015 13:38:49 GMT
Hello everyone,

I just figured out the configuration issue causing my problem.

Original configuration mod_proxy_wstunnel with SwampDragon:

ProxyPass /data/ ws://127.0.0.1:9001/data/
ProxyPassReverse /data/ ws://127.0.0.1:9001/data/
ProxyPass /settings.js http://127.0.0.1:9001/settings.js
ProxyPassReverse /settings.js http://127.0.0.1:9001/settings.js
ProxyPreserveHost On
ProxyRequests Off
ProxyVia On

The following configuration for mod_proxy_wstunnel with SwampDragon works fine:

ProxyPassMatch /data/(\d+)/(\w+)/websocket ws://127.0.0.1:9001/data/$1/$2/websocket
ProxyPass /data/info http://127.0.0.1:9001/data/info
ProxyPassReverse /data/info http://127.0.0.1:9001/data/info
ProxyPass /settings.js http://127.0.0.1:9001/settings.js
ProxyPassReverse /settings.js http://127.0.0.1:9001/settings.js
ProxyPreserveHost On
ProxyRequests Off
ProxyVia On

The issue was caused by the fact that /data/info is requested before a WebSocket-upgrade request
to /data/(\d+)/(\w+)/websocket is performed. Because /data/info was redirected to the WebSocket-server
using the same rule as /data/(\d+)/(\w+)/websocket before, mod_proxy_wstunnel continued to
also forward all HTTP-traffic to the WebSocket-server.

Hope this helps in case anyone else runs into the same problem. You have to make sure that
ws:// or was:// forwarding is only configured for the actual WebSocket-URL and does not affect
any other requests.

Thanks for pointing me into the right direction.

Best regards,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message