I need to configure in Apache 2.4.9 (with mod_proxy and mod_proxy_wstunnel activated) a proxy with this mapping:
E.g.:
In other words, I need a proxy that keeps (preserves) the protocol.
This configuration does not work:
<VirtualHost *:80>
...
ProxyRequests Off
ProxyPreserveHost Off
ProxyPass / http://my.backend:8080/
ProxyPassReverse / http://my.backend:8080/
</VirtualHost>
because all request (no matter protocol) are proxied to http*
Anyone knows how can I solve this?
Thanks!
A posible solution is:
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =WebSocket [NC,NV]
RewriteRule ^/(.*) ws://my.backend:8080/$1 [P]
RewriteRule ^/(.*) http://my.backend:8080/$1 [P]