0

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?

Suhaib Janjua
  • 3,538
  • 16
  • 59
  • 73
renton
  • 61
  • 5
  • Possible duplicate of [Apache2 WebSockets reverse proxy on same URL](http://stackoverflow.com/questions/29792372/apache2-websockets-reverse-proxy-on-same-url) – gre_gor May 17 '17 at 19:29
  • thanks, this solution works with apache 2.4 only – renton May 18 '17 at 13:12

0 Answers0