refactor haproxy

This commit is contained in:
Michael Rennecke
2019-06-17 20:44:48 +02:00
parent 017f5d91ed
commit 3bfeff4d42
5 changed files with 25 additions and 12 deletions

View File

@@ -0,0 +1,6 @@
{% for domain in haproxy_domains %}
{{ domain }}
{% endfor %}
{% for domain in certbot_domains %}
{{ domain }}
{% endfor %}

View File

@@ -74,7 +74,8 @@ frontend http
# Let's encrypt
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
use_backend bk_letsencrypt if letsencrypt-acl
http-request set-header Host certbot if letsencrypt-acl
use_backend bk_apache if letsencrypt-acl
# stats backend
acl stats-acl path_beg /haproxy
@@ -84,10 +85,6 @@ frontend http
use_backend bk_%[hdr(Host),lower,map(/etc/haproxy/hostname2backend.map)] if hostname_has_backend
backend bk_letsencrypt
server letsencrypt 127.0.0.1:8888
{% for backend in haproxy_backends %}
backend bk_{{ backend }}
{% if haproxy_backends[backend]["httpchk"] is defined %}