2012-07-22 23:31:54 +02:00
|
|
|
# Prevent clients from accessing hidden files (starting with a dot)
|
2013-02-24 22:16:13 +01:00
|
|
|
# This is particularly important if you store .htpasswd files in the site hierarchy
|
2015-06-08 14:56:19 +02:00
|
|
|
# Access to `/.well-known/` is allowed.
|
|
|
|
# https://www.mnot.net/blog/2010/04/07/well-known
|
|
|
|
# https://tools.ietf.org/html/rfc5785
|
|
|
|
location ~* /\.(?!well-known\/) {
|
2013-02-24 21:41:51 +01:00
|
|
|
deny all;
|
2012-07-22 23:31:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Prevent clients from accessing to backup/config/source files
|
2015-06-08 14:56:19 +02:00
|
|
|
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
|
2013-02-24 21:41:51 +01:00
|
|
|
deny all;
|
2012-07-22 23:31:54 +02:00
|
|
|
}
|