Skip to content

Commit

Permalink
Updated locations to match h5bp's Apache config
Browse files Browse the repository at this point in the history
See h5bp/server-configs-apache#31 for `well-known` change.
  • Loading branch information
Cryszon committed Jun 8, 2015
1 parent 8e361ed commit d37a4c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions h5bp/location/protect-system-files.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Prevent clients from accessing hidden files (starting with a dot)
# This is particularly important if you store .htpasswd files in the site hierarchy
location ~* (?:^|/)\. {
# 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\/) {
deny all;
}

# Prevent clients from accessing to backup/config/source files
location ~* (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
deny all;
}

0 comments on commit d37a4c7

Please sign in to comment.