server-configs-nginx/nginx/conf/protect-system-files.conf

10 lines
262 B
Plaintext

# Prevent clients from accessing hidden files (starting with a dot)
location ~* (?:^|/)\. {
deny all;
}
# Prevent clients from accessing to backup/config/source files
location ~* (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
deny all;
}