diff --git a/templates/etc/nginx/sites-available/vhost.j2 b/templates/etc/nginx/sites-available/vhost.j2 index 5d0f263..9e3c8c1 100644 --- a/templates/etc/nginx/sites-available/vhost.j2 +++ b/templates/etc/nginx/sites-available/vhost.j2 @@ -83,7 +83,7 @@ server { {% if location.custom_options is defined and location.custom_options %} {% for inline_option in location.custom_options %} - {{ inline_option }}; + {{ inline_option }}{{ "" if inline_option.startswith("if ") else ";" }} {% endfor %} {% endif %} } @@ -101,7 +101,7 @@ server { {% if error_location.custom_options is defined and error_location.custom_options %} {% for inline_option in error_location.custom_options %} - {{ inline_option }}; + {{ inline_option }}{{ "" if inline_option.startswith("if ") else ";" }} {% endfor %} {% endif %} }