From 39886f45ebffb5848cc5b7a432d898a1b3e35b7d Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Sun, 17 Sep 2023 13:24:27 +0200 Subject: [PATCH] Caddy: enable active health checks for LB --- ansible/roles/caddy/templates/Caddyfile.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/roles/caddy/templates/Caddyfile.j2 b/ansible/roles/caddy/templates/Caddyfile.j2 index 653955d..8fa3d17 100644 --- a/ansible/roles/caddy/templates/Caddyfile.j2 +++ b/ansible/roles/caddy/templates/Caddyfile.j2 @@ -1,5 +1,10 @@ {{ caddy.server_name }} { reverse_proxy {{ caddy.lb_targets | join(" ") }} { lb_policy cookie + health_uri / + health_port 80 + health_interval 5s + health_timeout 2s + health_status 2xx } }