From 6ff94a53d0935d6dab5bf4ae944d2ca807ec09fc Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 19 Sep 2022 14:30:14 +0200 Subject: [PATCH] fix config HAProxy --- etc/haproxy/haproxy.cfg | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etc/haproxy/haproxy.cfg b/etc/haproxy/haproxy.cfg index 424d5df..822f795 100644 --- a/etc/haproxy/haproxy.cfg +++ b/etc/haproxy/haproxy.cfg @@ -162,7 +162,6 @@ frontend external # BEGIN frontend_external section for site 'example' acl example_com_domains hdr(host) -i example.com acl example_com_domains2 hdr(host) -i example.org www.example.org - ### acl example_maintenance_ips src -f /etc/haproxy/example/maintenance_ips # Redirect to HTTPS without Let's Encrypt certificate ### redirect scheme https code 301 if example_com_domains !{ ssl_fc } @@ -183,8 +182,8 @@ frontend external ### http-request deny if example_com_domains { src 1.2.3.4 } # routing directives, all conditionned by (at least) the "example_com_domains" ACL - # Maintenance mode (### -> uncomment BUT define example_maintenance_ips acl before) - ### use_backend example_maintenance if example_com_domains !example_maintenance_ips !maintenance_ips + # Maintenance mode (### -> uncomment BUT define example_com_maintenance_ips acl before) + ### use_backend example_com_maintenance if example_com_domains !example_com_maintenance_ips !maintenance_ips # Use Varnish if available use_backend varnish if example_com_domains varnish_available varnish_http_verb @@ -246,7 +245,7 @@ backend example_com http-response set-header X-Boost-Proto http if !{ ssl_bc } server example-hostname 1.2.3.4:443 check observe layer4 ssl verify none -backend example_maintenance +backend example_com_maintenance http-request set-log-level silent errorfile 503 /etc/haproxy/sites/example/maintenance.http # END backend section for site 'example'