Tomcat-6.0.28: server.xml
........
channelSendOptions="8">
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/>
address="228.0.0.5" #如果内网存在多个集群应用,注意使用不同地址
port="45564"
frequency="500"
dropTime="3000"/>
address="10.10.50.110"
port="4001"
port="4002"
autoBind="100"
selectorTimeout="5000"
maxThreads="6"/>
filter=""/>
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
........
Apache-2.0.22: httpd.conf
ProxyRequests Off
#ProxyPass /
#ProxyPassReverse /
#多tomcat应用轮循
ProxyPass / balancer://
mycluster/ stickysession=JSESSIONID nofailover=On
ProxyPassReverse / balancer://
mycluster/ #路径一定不能缺少最后的"/"标识
BalancerMember ajp://127.0.0.1:8019 loadfactor=10 route=jvm1
BalancerMember ajp://127.0.0.1:8029 loadfactor=10 route=jvm2
阅读(819) | 评论(0) | 转发(0) |