From 12e63b396857804bef445f1546a2d3892b65f596 Mon Sep 17 00:00:00 2001
From: Andrea Dell'Amico <andrea.dellamico@isti.cnr.it>
Date: Fri, 3 May 2024 18:28:37 +0200
Subject: [PATCH] Give the options to allow dotfiles other than '.ht*', third
 try.

---
 templates/nginx-virthost.j2 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/templates/nginx-virthost.j2 b/templates/nginx-virthost.j2
index 95a0c5b..fb4a615 100644
--- a/templates/nginx-virthost.j2
+++ b/templates/nginx-virthost.j2
@@ -38,7 +38,8 @@ server {
         log_not_found off;
         return 404;
     }
-{% elif nginx_block_dangerous_dotfiles %}
+{% else %}
+{% if nginx_block_dangerous_dotfiles %}
     location ~ /\.(?ht).* {
         deny all;
         access_log off;
@@ -256,7 +257,8 @@ server {
         log_not_found off;
         return 404;
     }
-{% elif nginx_block_dangerous_dotfiles %}
+{% else %}
+{% if nginx_block_dangerous_dotfiles %}
     location ~ /\.(?ht).* {
         deny all;
         access_log off;