Skip to content

Instantly share code, notes, and snippets.

@goncha
Created August 12, 2013 05:31
Show Gist options
  • Save goncha/6208437 to your computer and use it in GitHub Desktop.
Save goncha/6208437 to your computer and use it in GitHub Desktop.
Haproxy naming based dispatch
backend host1
mode http
server inst1 host1:port1
backend host2
mode http
server inst1 host2:port2
frontend http-in
bind :80
mode http
acl host_host1 hdr_dom(host) -i www.example.com
use_backend host1 if host_host1
default_backend host2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment