The author helps with an Apache rule:
<Files ~ "(^#.*#|~|\.sw[op])$"> Order allow,deny Deny from all </Files>
What would be the equivalent of this for Nginx?
<Files ~ "(^#.*#|~|\.sw[op])$"> Order allow,deny Deny from all </Files>
What would be the equivalent of this for Nginx?
location ~ "(^#.*#|~|\.sw[op])$" {
return 401;
}
Or something along those lines.Nodesocket's answer is good as well: http://news.ycombinator.com/item?id=5164017
Simply giving the hacker less information (though not just depending on this) is a useful form of security. If you give them a 401, then they at least know that the file exists.