diff --git a/roles/ingress/templates/vhosts.conf.j2 b/roles/ingress/templates/vhosts.conf.j2 index 286aea2..172c5ac 100644 --- a/roles/ingress/templates/vhosts.conf.j2 +++ b/roles/ingress/templates/vhosts.conf.j2 @@ -33,6 +33,15 @@ server { {% endfor %} {% endif %} +{% if server.locations is defined %} + # Extra manually-defined locations +{% for location in server.locations %} + location {{ location.location }} { + {{ location.contents }} + } +{% endfor %} +{% endif %} + {% if server.proxy_pass is defined %} # Singular proxy_pass location / { @@ -49,15 +58,6 @@ server { proxy_pass {{ proxy.pass }}; } {% endfor %} -{% endif %} - -{% if server.locations is defined %} - # Extra manually-defined locations -{% for location in server.locations %} - location {{ location.location }} { - {{ location.contents }} - } -{% endfor %} {% endif %} resolver {{ ingress_resolver }};