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