by nodesocket · 13y ago · 0 comments
# prevent hidden files from being served and logged
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
# prevent tilde files from being served and logged
location ~ ~$ {
access_log off;
log_not_found off;
deny all;
}A much cleaner solution would be to separate "callable" entry-point files (like index.php) from "library" files into separate directories and point nginx/Apache only to the directory with callable files.