mod_proxy_wstunnel should allow to do that.
mod_proxy_wstunnel supports websocket, and mod_proxy_http and mod_proxy_ajp support http.
when a websocket request and a http request come into apache with modcluster,
how can i configure to proxy them to the backends with the same protocol as coming in?
may be this is a strange scenario.
There is a Jboss server(ip:188.8.131.52),supported websocket and http in different url.
access Jboss server like following:
when i use apache(ip:184.108.40.206) with modclucter for loadbalancing, problem comes.
if accessing http://220.127.116.11/Servlet/http success, accessing ws://18.104.22.168/Servlet/ws will fail.
if accessing ws://22.214.171.124/Servlet/ws success, accessing http://126.96.36.199/Servlet/http will fail.
It seems that apache with modclucter can not proxy http and websocket request at same time.
Wouldn't it help to distinguish between your ws and http servlets with a ProxyPassMatch directive?
thanks for you suggesstion.
I have tried ProxyPassMatch and ProxyPass, but it didn't help me.
I look up the document and source code of modcluster, and find that ProxyPassMatch and ProxyPass can only be use like:
"ProxyPassMatch regex !"