Re: Weird connection issues with mod_proxy_wstunnel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx






[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux