Fix the dotfiles regexp, finally.

This commit is contained in:
Andrea Dell'Amico 2024-05-03 18:51:15 +02:00
parent 47fa70ebb3
commit 7f09d1d812
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 3 additions and 3 deletions

View File

@ -31,6 +31,7 @@ upstream {{ u_bk.name }} {
server {
listen {{ item.http_port | default ('80') }};
server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %};
{% if nginx_block_dotfiles %}
location ~ /\.(?!well-known).* {
deny all;
@ -39,7 +40,7 @@ server {
return 404;
}
{% elif nginx_block_dangerous_dotfiles %}
location ~ /\.(?ht).* {
location ~ /\.ht.* {
deny all;
access_log off;
log_not_found off;
@ -256,9 +257,8 @@ server {
log_not_found off;
return 404;
}
{% endif %}
{% elif nginx_block_dangerous_dotfiles %}
location ~ /\.(?ht).* {
location ~ /\.ht.* {
deny all;
access_log off;
log_not_found off;