Fix the dotfiles regexp, finally.
This commit is contained in:
parent
47fa70ebb3
commit
7f09d1d812
|
@ -31,6 +31,7 @@ upstream {{ u_bk.name }} {
|
||||||
server {
|
server {
|
||||||
listen {{ item.http_port | default ('80') }};
|
listen {{ item.http_port | default ('80') }};
|
||||||
server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %};
|
server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %};
|
||||||
|
|
||||||
{% if nginx_block_dotfiles %}
|
{% if nginx_block_dotfiles %}
|
||||||
location ~ /\.(?!well-known).* {
|
location ~ /\.(?!well-known).* {
|
||||||
deny all;
|
deny all;
|
||||||
|
@ -39,7 +40,7 @@ server {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
{% elif nginx_block_dangerous_dotfiles %}
|
{% elif nginx_block_dangerous_dotfiles %}
|
||||||
location ~ /\.(?ht).* {
|
location ~ /\.ht.* {
|
||||||
deny all;
|
deny all;
|
||||||
access_log off;
|
access_log off;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
|
@ -256,9 +257,8 @@ server {
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
{% endif %}
|
|
||||||
{% elif nginx_block_dangerous_dotfiles %}
|
{% elif nginx_block_dangerous_dotfiles %}
|
||||||
location ~ /\.(?ht).* {
|
location ~ /\.ht.* {
|
||||||
deny all;
|
deny all;
|
||||||
access_log off;
|
access_log off;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
|
|
Loading…
Reference in New Issue