Skip to content

Instantly share code, notes, and snippets.

@ppeble
ppeble / gist:5623dc9aad55fcb797bc
Created August 26, 2014 16:51
HAProxy setup - ptrimble
frontend main-frontend
bind 0.0.0.0:80
mode http
# block if !goodguys
# block if heartbeat_req was_forwarded (disabled until we figure out heartbeats to dependant services)
acl goodguys src 127.0.0.0/8 192.168.0.0/16 10.0.0.0/8
acl heartbeat_req url_beg /heartbeat
acl local-dev-server.dev_host_acl hdr(host) -i 127.0.0.1
acl public-api.dev_host_acl hdr(host) -i public-api.dev
acl rbac.dev_host_acl hdr(host) -i rbac.dev
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#debug
#quiet
user haproxy
group haproxy