Answer the question
In order to leave comments, you need to log in
How to implement access to the site page from certain Ip ranges through nginx?
I'm trying to implement access to the site page through nginx from certain ip addresses
, the first option is through allow deny, for some reason some javascripts work crookedly, instead of executing it, it offers to download it.
second option
if ($remote_addr !~ (aaa.bbb.ccc)|(ddd.eee.fff)|(ggg.hhh.iii)) {
return 444;
}
geo $bad_user {
default 0;
171.196.0.0/161;
171.198.0.0/161;
location 0 {
rewrite ^ www.example.com/123.html;
}
}
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