You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2016/09/05 14:20:37 UTC
[Bug 57751] Problems with proxy reverse to websockets
https://bz.apache.org/bugzilla/show_bug.cgi?id=57751
Alberto García <al...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEEDINFO |RESOLVED
--- Comment #4 from Alberto García <al...@gmail.com> ---
It works fine with the last version (2.4.23). However, I had to do some changes
in my configuration:
---------------------------------
-- Begin configuration snippet --
---------------------------------
<Proxy balancer://clusterAPP1Websocket>
BalancerMember wss://localhost:8443/app1/messaging route=1
BalancerMember wss://localhost:9443/app1/messaging route=2
ProxySet stickysession=ROUTEID
</Proxy>
<Proxy balancer://clusterAPP1>
BalancerMember https://localhost:8443/app1 route=1
BalancerMember https://localhost:9443/app1 route=2
ProxySet stickysession=ROUTEID
</Proxy>
<Proxy balancer://clusterAPP2Websocket>
BalancerMember wss://localhost:10443/app2/messaging route=1
BalancerMember wss://localhost:11443/app2/messaging route=2
ProxySet stickysession=ROUTEID
</Proxy>
<Proxy balancer://clusterAPP2>
BalancerMember https://localhost:10443/app2 route=1
BalancerMember https://localhost:11443/app2 route=2
ProxySet stickysession=ROUTEID
</Proxy>
ProxyPassMatch "/app1/messaging/(.*)/websocket"
balancer://clusterAPP1Websocket/$1/websocket
ProxyPass /app1 balancer://clusterAPP1
ProxyPassReverse /app1/messaging balancer://clusterAPP1Websocket
ProxyPassReverse /app1 balancer://clusterAPP1
ProxyPass "/app2/messaging/(.*)/websocket"
balancer://clusterAPP2Websocket/$1/websocket
ProxyPass /app2 balancer://clusterAPP2
ProxyPassReverse /app2/messaging balancer://clusterAPP2Websocket
ProxyPassReverse /app2 balancer://clusterAPP2
---------------------------------
-- End configuration snippet --
---------------------------------
The change was due to the fact that the request to /app1/messaging/info was
done without sending the websockets headers (Upgrade: WebSocket, Connection:
Upgrade). For this reason, there wasn't a valid handler for this request in the
clusterAPP1Websocket. With the new configuration, request to
/app1/messaging/info are handled by clusterAPP1 (by using mod_proxy_http) and
the rest of the request relative to websockets (in the form of
"app1/messaging/997/5vkkyptu/websocket", I'm using Java + Spring + SockJS) are
handled by clusterAPP1Websocket (by using mod_proxy_wstunnel) in the correct
way.
Thanks a lot.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org