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;