[nginx] how to restrict access to directory and subdirs
- by tst
I need to restrict access to any files or subdirs in direstory "testdir". My conf:
...
location ~* ^.+\.(jpg|txt)$ {
root /var/www/site;
}
location /testdir {
deny all;
return 404;
}
...
In my configuration I have no restrictions on /testdir/jpg_or_txt-files. How to do it?