Fwd: Deny access to subfolder/files

basti black.fledermaus at arcor.de
Fri Feb 13 13:20:29 UTC 2015


Hello,

i have a URL like

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

I want to deny access to all files and folders in /doc/...
and try

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

I does not work, i can download the file above.
How can please help?

Thanks!





More information about the nginx mailing list