Files
B24-docker/confs/nginx/inc/block.conf
T
2026-05-20 15:23:05 +03:00

80 lines
1.3 KiB
Plaintext

#
# .ht files: .htpasswd, .htaccess
#
location ~* /\.ht {
deny all;
}
#
# repositories: .svn, .hg, .git
#
location ~* /\.(svn|hg|git) {
deny all;
}
#
# ignore files: .hgignore, .gitignore
#
location ~* /\.(hgignore|gitignore) {
deny all;
}
#
# tmp files without filename: .orig, .bak, .save, .old, .swp
#
location ~* /(\.(orig|bak|save|old|swp)) {
deny all;
}
#
# tmp files with filename: index.orig, index.bak, index.save, index.old, index.swp, index~
#
location ~* /*(\.(orig|bak|save|old|swp)|~)$ {
deny all;
}
#
# macos and windows special files: .DS_Store, Thumbs.db
#
location ~* /(\.DS_Store|Thumbs.db) {
deny all;
}
#
#location ~* /vendor/ {
# deny all;
#}
#
location ~* /composer {
deny all;
}
#
# bitrix internal locations
#
location ~* ^/bitrix/(modules|local_cache|stack_cache|managed_cache|php_interface) {
deny all;
}
#
location ~* ^/bitrix/\.settings\.php {
deny all;
}
#
location ~* ^/bitrix/\.settings_extra\.php {
deny all;
}
#
# upload 1c files
#
location ~* ^/upload/1c_[^/]+/ {
deny all;
}
#
# use the file system to access files outside the site (cache)
#
location ~* /\.\./ {
deny all;
}
#
location ~* ^/bitrix/html_pages/\.config\.php {
deny all;
}
#
location ~* ^/bitrix/html_pages/\.enabled {
deny all;
}
#