Fwd: Deny access to subfolder/files

Francis Daly francis at daoine.org
Fri Feb 13 17:33:59 UTC 2015


On Fri, Feb 13, 2015 at 02:20:29PM +0100, basti wrote:

> https://example.com/foo/doc/bar/filename.txt

> location ~ ^/foo/(doc|etc|lib|log|sbin|var/cache|var/lib|var/log)/ {
>   deny all;
> }

http://nginx.org/r/location

One request is handled in one location.

Which one location in your config will handle the request
/foo/doc/bar/filename.txt ?

If it is the one you show, you will get http 403.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list