This commit is contained in:
@@ -15,7 +15,7 @@ global
|
||||
userlist creds
|
||||
user {{ username }} insecure-password {{ password }}
|
||||
|
||||
frontend secure
|
||||
frontend auth
|
||||
bind :8080
|
||||
http-request auth unless { http_auth(creds) }
|
||||
mode http
|
||||
@@ -26,12 +26,13 @@ frontend secure
|
||||
maxconn 8000
|
||||
timeout client 30s
|
||||
|
||||
use_backend contest if { hdr(host) -i {{ dns_prefix }}.{{ dns_suffix }} }
|
||||
use_backend rank if { hdr(host) -i {{ dns_prefix }}-ranking.{{ dns_suffix }} }
|
||||
use_backend admin if { hdr(host) -i {{ dns_prefix }}-admin.{{ dns_suffix }} }
|
||||
default_backend contest
|
||||
|
||||
frontend main
|
||||
bind :80
|
||||
# bind :80
|
||||
bind :443 ssl crt /etc/haproxy/cert.pem
|
||||
mode http
|
||||
log global
|
||||
option httplog
|
||||
@@ -40,9 +41,17 @@ frontend main
|
||||
maxconn 8000
|
||||
timeout client 30s
|
||||
|
||||
use_backend rank if { hdr(host) -i {{ dns_prefix }}-ranking.{{ dns_suffix }} }
|
||||
use_backend admin if { hdr(host) -i {{ dns_prefix }}-admin.{{ dns_suffix }} }
|
||||
default_backend contest
|
||||
use_backend secure if { hdr(host) -i {{ dns_prefix }}.{{ dns_suffix }} }
|
||||
use_backend secure if { hdr(host) -i {{ dns_prefix }}-ranking.{{ dns_suffix }} }
|
||||
use_backend secure if { hdr(host) -i {{ dns_prefix }}-admin.{{ dns_suffix }} }
|
||||
|
||||
backend secure
|
||||
mode http
|
||||
balance roundrobin
|
||||
timeout connect 5s
|
||||
timeout server 30s
|
||||
timeout queue 30s
|
||||
server secure1 127.0.0.1:8080 check
|
||||
|
||||
backend contest
|
||||
mode http
|
||||
|
||||
Reference in New Issue
Block a user