Created
June 22, 2011 12:52
-
-
Save pingles/1040029 to your computer and use it in GitHub Desktop.
haproxy
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
backend legacy | |
mode http | |
timeout connect 10s | |
timeout server 30s | |
balance roundrobin | |
server bigip 213.52.205.36:80 weight 1 maxconn 512 | |
backend elb | |
mode http | |
timeout connect 10s | |
timeout server 30s | |
balance roundrobin | |
#server uswitch-shared uswitch-shared-977742619.eu-west-1.elb.amazonaws.com:80 weight 1 maxconn 512 | |
#server uswitch-shared web-d-main-process.uswitchinternal.com weight 1 maxconn 512 redir http://web-d-main-process.uswitchinternal.com | |
server uswitch-shared web-d-main-process.uswitchinternal.com weight 1 maxconn 512 | |
frontend http_proxy | |
bind *:80 | |
mode http | |
option forwardfor | |
option http-server-close | |
option http-pretend-keepalive | |
default_backend legacy | |
acl req_elb_path path_beg /gas-electricity/comparison | |
reqirep www.uswitch.com Host:\ main-process.uswitchinternal.com if req_elb_path | |
use_backend elb if req_elb_path | |
listen https_proxy :443 | |
mode tcp | |
option ssl-hello-chk | |
balance roundrobin | |
server legacy_ssl 213.52.205.36 |
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
sudo apt-get update | |
sudo apt-get upgrade | |
# we'll use PCRE for better regex performance | |
sudo apt-get install libpcre3-dev | |
wget http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.15.tar.gz | |
tar zxvf haproxy-1.4.15.tar.gz | |
make TARGET=linux26 ARCH=i386 USE_PCRE=1 | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment