Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Last active January 19, 2020 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsh-code/1a02fcd2b87c0b45828cddf7643c62b0 to your computer and use it in GitHub Desktop.
Save tsh-code/1a02fcd2b87c0b45828cddf7643c62b0 to your computer and use it in GitHub Desktop.
Basic HAProxy config
defaults
mode http
option http-server-close
timeout connect 5s
timeout client 30s
timeout client-fin 30s
timeout server 30s
timeout tunnel 1h
default-server inter 1s rise 2 fall 1 on-marked-down shutdown-sessions
option forwardfor
frontend all
bind 127.0.0.1:8080
default_backend backends
backend backends
server srv1 127.0.0.1:8081 check
server srv2 127.0.0.1:8082 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment