Currently, I have successfully installed apache2.4.18 which contains the mod_proxy_wstunnel and installed tomcat7 on another machine. And I have deployed atmosphere sample app on tomcat7. Then I can visit http://tomcatserver.com:8080/ademo/index.html
This index.html was retrieved from https://github.com/Atmosphere/atmosphere-samples/blob/master/samples/chat/src/main/webapp/index.html.
Then I tried to set the httpd.conf within apache server like below. I did not use any VirtualHost related configuration. I just append the below two lines to the end of this httpd.conf file.
ProxyPass /ademo/ http://tomcatserver.com:8080/ademo/
ProxyPassReverse /ademo/ http://tomcatserver.com:8080/ademo/
Then I restart httpd, and visit below url. http://apachehttpdserver.com/ademo/index.html
I captured the browser snapshot below, I can find that the websocket was not supported.
So I was wondering how can I modify this httpd.conf to support websocket?
I have uncommentted the LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
Actually, I plan to set up more than one back-end servers ,so I use below configurations that referred to http://blog.arungupta.me/load-balance-websockets-apache-httpd-techtip48/. But I still get the error [Fri Jan 08 02:55:50.840362 2016] [proxy:warn] [pid 18446:tid 46971298007360] [client 10.248.66.148:52033] AH01144: No protocol handler was valid for the URL /ademo/socket.html. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule. One thing that I make sure is i have set the necessary modules in httpd.conf.
<Proxy balancer://mycluster>
# Define back-end servers:
# Server 1
BalancerMember ws://10.214.49.65:8080
# Server 2
BalancerMember ws://10.214.49.83:8080/
</Proxy>
ProxyPass /ademo balancer://mycluster/ademo
ProxyPassReverse /ademo balancer://mycluster/ademo