Answer the question
In order to leave comments, you need to log in
How to deny access to all folders except those specified in nginx?
There is a site, the url structure looks like this:
https:\\site\folder1\any-characters
https:\\site\folder2\any-characters
, etc. Tell me how to write a rule in nginx that allows access to folder1, folder2 ... and returns a 404 error for all other addresses?
Answer the question
In order to leave comments, you need to log in
I tried not to specify root and for each folder do location and specify root there?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question