diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-03-05 17:21:18 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-03-05 17:21:18 +0000 |
commit | 838aa6f203412c7dfa303fd9ee527771af547c65 (patch) | |
tree | 718a1011ff63a88021f07de5609f2ba27d58075a | |
parent | 1ffc44d71f935a2c3c20bb43217962aa157534b2 (diff) | |
download | infrastructure-838aa6f203412c7dfa303fd9ee527771af547c65.tar.gz |
frontend: Rearrange haproxy.cfg and fix a warning
-rw-r--r-- | frontend/haproxy.cfg | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/frontend/haproxy.cfg b/frontend/haproxy.cfg index b1564728..9910bed5 100644 --- a/frontend/haproxy.cfg +++ b/frontend/haproxy.cfg @@ -1,5 +1,9 @@ # HAProxy configuration for Baserock Project front-end proxy. +# See <https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7> +# for more documentation than you ever dreamed of. + + global maxconn 4000 @@ -20,25 +24,19 @@ defaults log global option httplog + frontend http-in bind *:80 - # Rules below here implement the URL-based forwarding to the - # appropriate instance. The hdr(host) call means 'extract the - # first Host header from the HTTP request or response', the '-m beg' - # switch means 'match against the beginning of it' and the '-i' flag - # makes the match case-insensitive. - # - # See <https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7> - # for more documentation than you ever dreamed of. - + # The hdr(host) call means 'extract the first Host header from the HTTP request + # or response', the '-m beg' switch means 'match against the beginning of it' + # and the '-i' flag makes the match case-insensitive. acl host_gerrit hdr(host) -m beg -i gerrit - use_backend baserock_gerrit_http if host_gerrit - acl host_mason_x86_32 hdr(host) -m beg -i mason-x86-32 - use_backend baserock_mason_x86_32_http if host_mason_x86_32 - acl host_openid hdr(host) -m beg -i openid + + use_backend baserock_gerrit_http if host_gerrit + use_backend baserock_mason_x86_32_http if host_mason_x86_32 use_backend baserock_openid_provider_http if host_openid frontend ssh-in: @@ -49,10 +47,11 @@ frontend ssh-in: # For this reason it's probably worth pointing gerrit.baserock.org to # a different floating IP that serves only the gerrit instance. mode tcp + option tcplog + bind *:29418 default_backend baserock_gerrit_ssh -# Entries here locate each server backend. backend baserock_gerrit_http server baserock_gerrit 192.168.222.69:8080 @@ -62,7 +61,7 @@ backend baserock_gerrit_ssh server baserock_gerrit 192.168.222.69:29418 backend baserock_mason_x86_32_http - server baserock_mason_x86_32 192.168.222.78 + server baserock_mason_x86_32 192.168.222.78:80 backend baserock_openid_provider_http - server baserock_openid_provider 192.168.222.67 + server baserock_openid_provider 192.168.222.67:80 |