Answer the question
In order to leave comments, you need to log in
Nginx, deny all works strangely. What to do?
Hello fellow people. When such lines are entered into the nginx config, access to all files except .php is restricted. How can I fix it?
location /engine/ {
deny all;
}
Answer the question
In order to leave comments, you need to log in
The regular prefix location has a lower precedence than regular expression locations.
Raise the priority of the deny rule with the ^~ modifier:
location ^~ /engine/ {
deny all;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question