Skip to content

Instantly share code, notes, and snippets.

@big-samantha
Created November 13, 2012 20:18
Show Gist options
  • Save big-samantha/4068129 to your computer and use it in GitHub Desktop.
Save big-samantha/4068129 to your computer and use it in GitHub Desktop.
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 16384
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
contimeout 50000
clitimeout 50000
srvtimeout 50000
balance roundrobin
option httpclose
option forwardfor
stats enable
stats auth enter:Allyson1
frontend enter-internal-front
bind :80
## default enter-cluster backend
# ips need to be converted to variables
backend enter-internal-all
<% if @hostname =~ /^s-/ -%>
option httpchk http://zachary.stag.enternewmedia.com/foo.jpg
server s-app1 10.177.11.5:80 check inter 1m
server s-app2 10.177.10.153:80 check inter 1m
<% else -%>
option httpchk http://zachary.prod.enternewmedia.com/foo.jpg
server p-app1 10.177.9.17:80 check inter 1m
server p-app2 10.177.9.220:80 check inter 1m
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment