Stats HAproxy

This commit is contained in:
nyanloutre 2018-04-18 20:29:05 +02:00
parent 8bf38a3be2
commit 5bda521da7
1 changed files with 8 additions and 0 deletions

View File

@ -59,9 +59,11 @@ frontend public
bind :::443 v4v6 ssl crt /var/lib/acme/${cfg.domaine}/full.pem alpn h2,http/1.1 bind :::443 v4v6 ssl crt /var/lib/acme/${cfg.domaine}/full.pem alpn h2,http/1.1
mode http mode http
acl letsencrypt-acl path_beg /.well-known/acme-challenge/ acl letsencrypt-acl path_beg /.well-known/acme-challenge/
acl haproxy-acl path_beg /haproxy
redirect scheme https code 301 if !{ ssl_fc } !letsencrypt-acl redirect scheme https code 301 if !{ ssl_fc } !letsencrypt-acl
http-response set-header Strict-Transport-Security max-age=15768000 http-response set-header Strict-Transport-Security max-age=15768000
use_backend letsencrypt-backend if letsencrypt-acl use_backend letsencrypt-backend if letsencrypt-acl
use_backend haproxy_stats if haproxy-acl
${concatStrings ( ${concatStrings (
mapAttrsToList (name: value: mapAttrsToList (name: value:
@ -72,6 +74,12 @@ ${concatStrings (
backend letsencrypt-backend backend letsencrypt-backend
mode http mode http
server letsencrypt 127.0.0.1:${toString nginx_port} server letsencrypt 127.0.0.1:${toString nginx_port}
backend haproxy_stats
mode http
stats enable
stats hide-version
acl AuthOK_LOUTRE http_auth(LOUTRE)
http-request auth realm LOUTRE if !AuthOK_LOUTRE
${concatStrings ( ${concatStrings (
mapAttrsToList (name: value: mapAttrsToList (name: value: