Deny access to hidden files and directories (and their content)

Palvelin Postmaster postmaster at
Wed Sep 19 08:25:49 UTC 2018

I believe my current rexexp match isn’t proper because it’s missing an anchor from the pattern:

location ~ /\. {
	deny all;

What would be more appropriate? Would this work?

location ~ /\..*$

-- Hostmaster
postmaster at

More information about the nginx mailing list