vim /application/apache/conf/extra/httpd-proxy.conf
ProxyRequests Off
<proxy balancer://lbcluster1>
BalancerMember ajp://10.125.192.2:8009 loadfactor=1
BalancerMember ajp://10.125.192.3:8009 loadfactor=1
ProxySet lbmethod=bytraffic
</proxy>
<VirtualHost *:80>
ServerName localhost
ProxyVia On
ProxyPass / balancer://lbcluster1/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://lbcluster1/
<Location /balancer-manager>
SetHandler balancer-manager
Proxypass !
Require all granted
</Location>
<Proxy *>
Require all granted
</Proxy>
<Location / >
Require all granted
</Location>
</VirtualHost>
检查语法
/application/apache/bin/apachectl -t
/application/apache/bin/apachectl graceful
测试检查
session不会变化,说明已经共享了session