From 40b9b26fa9fb9a97879394cd0aaf72e706d4eb1a Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Thu, 29 Dec 2016 19:21:37 +0100 Subject: [PATCH] reordered statements --- haproxy_ssl.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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