Created
March 30, 2017 23:11
-
-
Save snambi/f93b98005fa2c009bc857915c19689a8 to your computer and use it in GitHub Desktop.
ha-proxy configuration
This file contains 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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
user haproxy | |
group haproxy | |
daemon | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
contimeout 5000 | |
clitimeout 50000 | |
srvtimeout 50000 | |
errorfile 400 /etc/haproxy/errors/400.http | |
errorfile 403 /etc/haproxy/errors/403.http | |
errorfile 408 /etc/haproxy/errors/408.http | |
errorfile 500 /etc/haproxy/errors/500.http | |
errorfile 502 /etc/haproxy/errors/502.http | |
errorfile 503 /etc/haproxy/errors/503.http | |
errorfile 504 /etc/haproxy/errors/504.http | |
frontend http-in | |
bind 0.0.0.0:80 | |
acl pgwpmtsoa hdr(host) -i pgwpmtsoa-staging.qa.ebay.com | |
acl gwsvcsec hdr(host) -i gwsvcsec.stg.stratus.qa.ebay.com | |
acl pgwpmtsvc hdr(host) -i pgwpmtsvc.stg.qa.ebay.com | |
acl default hdr_end(host) -i .ebay.com | |
## figure out which one to use | |
use_backend pgwpmtsoa_cluster if pgwpmtsoa | |
use_backend gwsvcsec_cluster if gwsvcsec | |
use_backend pgwpmtsvc_cluster if pgwpmtsvc | |
use_backend direct_forward if default | |
backend pgwpmtsoa_cluster | |
option forwardfor | |
server node1 10.65.254.35:8080 | |
backend gwsvcsec_cluster | |
option forwardfor | |
server node1 10.148.242.51:8080 | |
backend pgwpmtsvc_cluster | |
option forwardfor | |
server node1 10.148.249.195:8080 | |
backend direct_forward | |
option httpclose | |
option http_proxy | |
listen stats :9000 | |
mode http | |
stats enable | |
stats hide-version | |
stats realm Haproxy\ Statistics | |
stats uri /stats | |
stats auth test:test123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@prkale sample haproxy.cfg that goes to /etc/haprpxy/ in a linux host