refactor haproxy
This commit is contained in:
6
roles/haproxy/templates/all-domains.txt
Normal file
6
roles/haproxy/templates/all-domains.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
{% for domain in haproxy_domains %}
|
||||
{{ domain }}
|
||||
{% endfor %}
|
||||
{% for domain in certbot_domains %}
|
||||
{{ domain }}
|
||||
{% endfor %}
|
@@ -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 %}
|
||||
|
Reference in New Issue
Block a user