From 7a44fa5df14000b6c93e3ebd40930eb398e1d985 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Tue, 30 Aug 2022 16:11:52 -0500 Subject: [PATCH] Put extra locations above default ones in nginx config --- roles/ingress/templates/vhosts.conf.j2 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 }};