diff --git a/templates/http/default.conf.j2 b/templates/http/default.conf.j2 index f2b07a0..db2a9ff 100644 --- a/templates/http/default.conf.j2 +++ b/templates/http/default.conf.j2 @@ -23,14 +23,14 @@ server { listen {{ item.value.port }}; {% endif %} server_name {{ item.value.server_name }}; -{% if item.value.autoindex %} +{% if item.value.autoindex is defined and item.value.autoindex %} autoindex on; {% endif %} {% if item.value.load_balancer is defined %} {% for location in item.value.load_balancer.locations %} location {{ item.value.load_balancer.locations[location].location }} { proxy_pass http://{{ item.value.load_balancer.locations[location].proxy_pass }}; -{% if item.value.load_balancer.health_check_plus %} +{% if item.value.load_balancer.health_check_plus is defined and item.value.load_balancer.health_check_plus %} health_check; {% endif %} proxy_set_header Host $host;