Created
January 17, 2012 16:50
-
-
Save atomsfat/1627452 to your computer and use it in GitHub Desktop.
Basic load balancer Apache
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
| ############################ | |
| # Load Balancer | |
| ############################ | |
| <VirtualHost *:80> | |
| ServerName atomsfat.net | |
| <Location "/manage-balancer"> | |
| SetHandler balancer-manager | |
| AuthType Basic | |
| AuthName "System challenge" | |
| AuthUserFile /var/monitor/apache/passwd/passwords | |
| Require user sysadmin | |
| </Location> | |
| </VirtualHost> | |
| ############################ | |
| # Proxy balancer | |
| ############################ | |
| <Proxy balancer://clusterl/> | |
| BalancerMember ajp://172.168.130.142:8010 route=w3t1 | |
| BalancerMember ajp://172.168.130.142:8011 route=w3t2 | |
| # the hot failover | |
| BalancerMember ajp://172.168.130.143:8010 route=w4t1 status=+H | |
| ProxySet stickysession=JSESSIONID | |
| </Proxy> | |
| <VirtualHost *:80> | |
| ServerAdmin [email protected] | |
| ServerName www.atomsfat.com.mx | |
| ServerAlias atomsfat.com.mx | |
| ErrorLog logs/www.atomsfat.com-error_log | |
| CustomLog logs/www.atomsfat.com_log common | |
| DocumentRoot /var/www/lat | |
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} !^www\.atomsfat\.com\.mx [NC] | |
| RewriteRule ^/(.*) http://www.atomsfat.com/$1 [L,R=permanent] | |
| Alias /error/ "/var/www/lat/error/" | |
| ProxyRequests Of | |
| ProxyPass /crossdomain.xml ! | |
| ProxyPass / balancer://clusterl/ stickysession=JSESSIONID | |
| ErrorDocument 503 /error/503.html | |
| </VirtualHost> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment