All checks were successful
Ansible Playbook lint / ansible-lint (push) Successful in 35s
70 lines
2.0 KiB
Django/Jinja
70 lines
2.0 KiB
Django/Jinja
#---------------------------------------------------------------------
|
|
# Example configuration. See the full configuration manual online.
|
|
#
|
|
# http://www.haproxy.org/download/2.5/doc/configuration.txt
|
|
#
|
|
#---------------------------------------------------------------------
|
|
|
|
global
|
|
maxconn 20000
|
|
log 127.0.0.1 local0
|
|
user haproxy
|
|
pidfile /run/haproxy.pid
|
|
daemon
|
|
|
|
userlist creds
|
|
user {{ username }} insecure-password {{ password }}
|
|
|
|
frontend secure
|
|
bind :8080
|
|
http-request auth unless { http_auth(creds) }
|
|
mode http
|
|
log global
|
|
option httplog
|
|
option dontlognull
|
|
option forwardfor except 127.0.0.0/8
|
|
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
|
|
|
|
frontend main
|
|
bind :80
|
|
mode http
|
|
log global
|
|
option httplog
|
|
option dontlognull
|
|
option forwardfor except 127.0.0.0/8
|
|
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
|
|
|
|
backend contest
|
|
mode http
|
|
balance roundrobin
|
|
timeout connect 5s
|
|
timeout server 30s
|
|
timeout queue 30s
|
|
server contest1 127.0.0.1:8888 check
|
|
|
|
backend admin
|
|
mode http
|
|
balance roundrobin
|
|
timeout connect 5s
|
|
timeout server 30s
|
|
timeout queue 30s
|
|
server admin1 127.0.0.1:8889 check
|
|
|
|
backend rank
|
|
mode http
|
|
balance roundrobin
|
|
timeout connect 5s
|
|
timeout server 30s
|
|
timeout queue 30s
|
|
server rank1 127.0.0.1:8890 check
|