From 47fa70ebb3b8572b930c102accab7da5991d11dd Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 3 May 2024 18:41:30 +0200 Subject: [PATCH] Give the options to allow dotfiles other than '.ht*', 5th try. --- templates/nginx-virthost.j2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/nginx-virthost.j2 b/templates/nginx-virthost.j2 index 047243d..90a60ca 100644 --- a/templates/nginx-virthost.j2 +++ b/templates/nginx-virthost.j2 @@ -38,8 +38,7 @@ server { log_not_found off; return 404; } -{% endif %} -{% if not nginx_block_dotfiles and nginx_block_dangerous_dotfiles %} +{% elif nginx_block_dangerous_dotfiles %} location ~ /\.(?ht).* { deny all; access_log off; @@ -258,7 +257,7 @@ server { return 404; } {% endif %} -{% if not nginx_block_dotfiles and nginx_block_dangerous_dotfiles %} +{% elif nginx_block_dangerous_dotfiles %} location ~ /\.(?ht).* { deny all; access_log off;