I have Tomcat listening on localhost and port 8181. And I need proxy requests to its by various proxy modules (http and ws) but identical url paths. For example:
<If "%{HTTP:Upgrade} == 'WebSocket'">
ProxyPass ws://localhost:8181/
</If>
<If "%{HTTP:Upgrade} != 'WebSocket'">
ProxyPass http://localhost:8181/
</If>
This snippet would be perfect for me if ProxyPass сould be put inside "if ... /if" expression unfortunately it's not allowed.
Is it possible to make something like with Apache 2.2/2.4?