#www.oldboyedu.com proxy demo
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
ProxyRequests Off
<Proxy balancer://mycluster>
BalancerMember http://192.168.56.11:8080
BalancerMember http://192.168.56.12:8080
</Proxy>
ProxyPass /demo balancer://mycluster
ProxyPassReverse /demo balancer://mycluster
<Location /manager>
SetHandler balancer-manager
Order Deny,Allow
Allow from all
</Location>
#www.oldboyedu.com proxy demo
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
ProxyRequests Off
<Proxy balancer://mycluster>
BalancerMember http://192.168.56.11:8080
BalancerMember http://192.168.56.12:8080
</Proxy>
#ProxyPass /demo balancer://mycluster
#ProxyPassReverse /demo balancer://mycluster
<Location /manager>
SetHandler balancer-manager
Order Deny,Allow
Allow from all
</Location>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/opt"
ServerName www.oldboyedu.com
ServerAlias oldboyedu.com
ErrorLog "logs/www.oldboyedu.com-error_log"
CustomLog "logs/www.oldboyedu.com-access_log" common
ProxyPass / balancer://mycluster
ProxyPassReverse / balancer://mycluster
</VirtualHost>