R
R
Ringil Endimion2015-01-18 04:44:45
Nginx
Ringil Endimion, 2015-01-18 04:44:45

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

1 answer(s)
E
Egor Kazantsev, 2015-01-19
@Ringil

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 question

Ask a Question

731 491 924 answers to any question