diff --git a/haproxy_ssl.conf b/haproxy_ssl.conf index 53b3009..14ec5e5 100644 --- a/haproxy_ssl.conf +++ b/haproxy_ssl.conf @@ -24,24 +24,27 @@ defaults frontend http bind *:80 reqadd X-Forwarded-Proto:\ http - acl letsencrypt-acl path_beg /.well-known/acme-challenge/ # add X-Forwarded-For Header to request http-request add-header X-Forwarded-For %[src] redirect scheme https code 301 if !{ ssl_fc } + + acl letsencrypt-acl path_beg /.well-known/acme-challenge/ use_backend letsencrypt-backend if letsencrypt-acl + default_backend www-backend frontend https bind *:443 ssl crt /data/haproxy/cert.pem reqadd X-Forwarded-Proto:\ https - acl letsencrypt-acl path_beg /.well-known/acme-challenge/ # add X-Forwarded-For Header to request http-request add-header X-Forwarded-For %[src] + acl letsencrypt-acl path_beg /.well-known/acme-challenge/ use_backend letsencrypt-backend if letsencrypt-acl + default_backend www-backend backend www-backend