Atmosphere 2.1.2 + apache 2.4.6 with mod_proxy_ajp cannot forward request to Tomcat 7 -
i have apache 2.4 mod_proxy_ajp forward rest requests tomcat 7. works fine except using atmosphere 2.1.2 , atmosphere calls not make tomcat. know there alternatives apache working websockets (nginx , haproxy etc) wondering if there way make work apache? here virtualhost definition in httpd.conf
<virtualhost *:80> servername 192.168.0.100 proxypass /roomky ajp://192.168.0.100:8009/roomky proxypassreverse /roomky ajp://192.168.0.100:8009/roomky/ proxyrequests on proxyvia on <proxy *> order deny,allow allow </proxy> </virtualhost>
any suggestions?
in apache:
- you must add mod_proxy_wstunnel (also requires mod_proxy)
- add proxy rules correct websocket (ws, not ajp) protocol:
- proxypass /roomky ws://localhost:8080/roomky
- proxypassreverse /roomky ws://localhost:8080/roomky
in tomcat:
1.- declare nio connector in $catalina_home/conf/server.xml
<connector protocol="org.apache.coyote.http11.http11nioprotocol" port="8080" ... "/>
restart both servers , test again!
Comments
Post a Comment