apache+tomcat集群&ajp 简单配置

849阅读 0评论2011-05-05 ygl23
分类:Java

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
       
 
或者使用mod_jk,参考http://space.itpub.net/583467/viewspace-611476

 
上一篇:vsftpd 最简单配置
下一篇:ntp no server suitable for synchronization found