ServerName mccbbgold.chinamworld.cn    ProxyPass /                 ajp://172.17.10.13:8009/    ProxyPa***everse  /         ajp://172.17.10.13:8009/    ErrorLog logs/oto-error.log    CustomLog logs/oto-access.log common

后端是tomcat.

    ServerName vipclub.jiumei.com    ProxyRequests off    ProxyVia On    ProxyPreserveHost On    ProxyPass / balancer://vipclub/ stickysession=PHPSESSIONID|phpsessionid    ProxyPa***everse / balancer://vipclub/ stickysession=PHPSESSIONID|phpsessionid    
    #BalancerMember http://172.17.10.15 loadfactor=100    BalancerMember http://172.17.10.139 loadfactor=100        Include /var/www/vhost/paybest_log.conf    ErrorLog logs/vipclub-error.log    CustomLog logs/vipclub-access_log combined

后端是web服务

NameVirtualHost *:80
    ServerName www.we360.cn    ProxyRequests off    ProxyVia On    ProxyPreserveHost On    ProxyPass /ykt balancer://ykt/ lbmethod=bytraffic    ProxyPass /  balancer://test/ stickysession=JSESSIONID nofailover=Off    ProxyPa***everse / balancer://test/    
    BalancerMember http://172.17.10.121:/yikatong/yikatong/view       
    BalancerMember ajp://172.17.10.114:8009 route=tomcat1    BalancerMember ajp://172.17.10.115:8009 route=tomcat2    ErrorLog logs/we360ssl_error_logTransferLog logs/we360ssl_access_log

nofailover=Off  session 绑定成功  nofailover=On 则每次跳转到不同的tomcat上

对二级目录的转发,用户访问 会跳转到web服务器上。

 

测试方法:在tomcat 目录上创建 jsp脚本

[root@wyh ~]# cd /opt/tomcat/webapps/test/[root@wyh test]# lstest.jsp[root@wyh test]# cat test.jsp   helloapp<%System.out.println("call test.jsp");%>   SessionID: <%=session.getId() %>  [root@wyh test]#
ServerName payment.paybest.cn
SetHandler weblogic-handler
WeblogicCluster 172.17.10.141:7034,WebLogicPort 7034MatchExpression /ABCPayment/*Include /var/www/vhost/JSESSIONID_log.confErrorLog logs/newabcpay_error.logCustomLog logs/newabcpay_access.log combined

后端是weblogic服务

ServerName ccbair.paybest.cn
# WeblogicCluster 172.17.10.141:8004,172.168.123.140:8004,# WeblogicCluster 172.168.123.140:8004,WeblogicCluster 172.17.10.141:8004WebLogicPort 8004ConnectTimeoutSecs 1800ConnectRetrySecs 2KeepAliveEnabled ONKeepAliveSecs 25Debug ONDebugConfigInfo ON#MatchExpression /aa/*.*#MatchExpression /aa/*
SetHandler weblogic-handlerInclude /var/www/vhost/JSESSIONID_log.confErrorLog logs/ccbticket_error.logCustomLog logs/ccbticket_access.log combined

weblogic集群环境