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

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

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