Skip to content

Instantly share code, notes, and snippets.

@scalp42
Forked from fenneh/HAProxyListenExample
Created December 29, 2015 02:56
Show Gist options
  • Save scalp42/be4d756094fed6fe0e7c to your computer and use it in GitHub Desktop.
Save scalp42/be4d756094fed6fe0e7c to your computer and use it in GitHub Desktop.
HAProxy HTTP Check with Head & User Agent type
listen justFenWEB
bind 192.168.100.100:80
mode tcp ## Drops from Layer 7 to Layer 4 routing as defined in defaults
option tcplog
balance source ## To maintain sessions
option httpchk HEAD / HTTP/1.0\r\nHost:\ www.justfen.com\r\nUser-Agent:\ HAProxy01 ## Used for checking HTTP health of web server
rspidel ^Set-cookie:\ IP= ## Will hide internal IP
server APP01 APP01.justfen.com:80 check
server APP03 APP03.justfen.com:80 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment