Created
April 5, 2017 08:34
-
-
Save quangtt-rks/3131cb8e5094b3a00e6e244ded506074 to your computer and use it in GitHub Desktop.
Sample config for load balancer on localhost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Listen 8080 | |
<VirtualHost *:8080> | |
ServerAdmin webmaster@localhost | |
ServerName 192.168.xxx.xxx | |
ProxyRequests Off | |
<Proxy balancer://mycluster> | |
BalancerMember http://192.168.xxx.yyy:8080 route=lb1 | |
BalancerMember http://192.168.xxx.zzz:8080 route=lb2 | |
ProxySet lbmethod=byrequests | |
</Proxy> | |
ProxyPass /balancer-manager ! | |
ProxyPass / balancer://mycluster/ | |
<Location /balancer-manager> | |
SetHandler balancer-manager | |
Order deny,allow | |
Allow from all | |
</Location> | |
ErrorLog /var/log/apache2/error.log | |
LogLevel warn | |
CustomLog /var/log/apache2/access.log combined | |
ServerSignature On | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment