Give the options to allow dotfiles other than '.ht*'.
This commit is contained in:
parent
9b7cc5b11a
commit
4999eaa896
|
@ -134,6 +134,7 @@ nginx_websockets_support: false
|
|||
# When we do not use letsencrypt:
|
||||
# nginx_ssl_cert_file: '{{ pki_dir }}/certs/nginx.crt'
|
||||
# nginx_ssl_cert_key: '{{ pki_dir }}/keys/nginx.key'
|
||||
nginx_block_dangerous_dotfiles: false
|
||||
nginx_block_dotfiles: true
|
||||
|
||||
# k,M,G
|
||||
|
|
|
@ -38,6 +38,13 @@ server {
|
|||
log_not_found off;
|
||||
return 404;
|
||||
}
|
||||
{% elif nginx_block_dangerous_dotfiles %}
|
||||
location ~ /\.ht.* {
|
||||
deny all;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
return 404;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if letsencrypt_acme_install %}
|
||||
|
@ -241,6 +248,7 @@ server {
|
|||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
{% if nginx_block_dotfiles %}
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
|
@ -248,6 +256,13 @@ server {
|
|||
log_not_found off;
|
||||
return 404;
|
||||
}
|
||||
{% elif nginx_block_dangerous_dotfiles %}
|
||||
location ~ /\.ht.* {
|
||||
deny all;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
return 404;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if haproxy_ips is defined %}
|
||||
|
|
Loading…
Reference in New Issue