Answer the question
In order to leave comments, you need to log in
How to restrict access to the admin panel for external IPs?
Question on a subject.
tried like this:
location ^~ /admin/ {
proxy_pass http://localhost:8000/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
deny all;
allow 192.168.111.0/24;
allow 172.16.0.0/24;
}
Answer the question
In order to leave comments, you need to log in
But because of this, he constantly redirects to the main page of the site
location ^~ /admin/ {
proxy_pass http://localhost:8000/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
allow 192.168.111.0/24;
allow 172.16.0.0/24;
deny all;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question