LoadModule proxy_module libexec/apache22/mod_proxy.so
LoadModule proxy_http_module libexec/apache22/mod_proxy_http.so
LoadModule proxy_http_ libexec/apache22/mod_proxy_ajp.so
LoadModule proxy_http_module libexec/apache22/mod_proxy_balancer.so
LoadModule status_module libexec/apache22/mod_status.so
<Proxy *>
Order deny,allow
allow from all
</Proxy>
ProxyPass / balancer://proxy/ stickysession=JSESSIONID nofailover=On lbmethod=byrequests
ProxyPassReverse / balancer://proxy/
<Proxy balancer://proxy>
BalancerMember ajp://218.193.237.23:8109/ loadfactor=50 route=worker1 #jvmRoute
BalancerMember ajp://218.193.237.23:8209/ loadfactor=50 route=worker2
</Proxy>
千万别忘了jvmRoute 否则保存不了session,网站一直进入,登录
LoadModule proxy_http_module libexec/apache22/mod_proxy_http.so
LoadModule proxy_http_ libexec/apache22/mod_proxy_ajp.so
LoadModule proxy_http_module libexec/apache22/mod_proxy_balancer.so
LoadModule status_module libexec/apache22/mod_status.so
<Proxy *>
Order deny,allow
allow from all
</Proxy>
ProxyPass / balancer://proxy/ stickysession=JSESSIONID nofailover=On lbmethod=byrequests
ProxyPassReverse / balancer://proxy/
<Proxy balancer://proxy>
BalancerMember ajp://218.193.237.23:8109/ loadfactor=50 route=worker1 #jvmRoute
BalancerMember ajp://218.193.237.23:8209/ loadfactor=50 route=worker2
</Proxy>
千万别忘了jvmRoute 否则保存不了session,网站一直进入,登录
本文介绍如何在Apache中配置代理模块实现负载均衡,并详细说明了如何设置粘性会话及成员服务器的相关参数。
873

被折叠的 条评论
为什么被折叠?



