diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2
index 88db3476659cf86ddafb947809e360a94ef6c43c..0e17a1718a57869044c597ba5649258ce1c93f9b 100644
--- a/templates/nginx.conf.j2
+++ b/templates/nginx.conf.j2
@@ -138,5 +138,5 @@ server {
         # disable access to API admin dashboard
         return 403;
     }
-    {% else -%}
+    {% endif -%}
 }