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

Palvelin Postmaster postmaster at palvelin.fi
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 ~ /\..*$

--
Palvelin.fi Hostmaster
postmaster at palvelin.fi



More information about the nginx mailing list