Answer the question
In order to leave comments, you need to log in
How to block access to url in nginx?
Hey!
There is a server on nginx and a site on Wordpress.
There was a task - to give access to a certain URL (not a directory, but to a certain page) only from a certain IP, and to prohibit the rest.
Tried such constructions in the config file
if ($request_uri ~ ^/specific-page) {
allow 1.1.1.1;
deny all;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question