How nginx restricts illegal access to someone's area
阿神
阿神 2017-05-16 17:12:51
0
2
583
  • For example, only users in Guangdong Province can open it
    All other regions will refuse connections

  • What if I block access from a country, such as users from South Korea, I don’t want them to access this website.

阿神
阿神

闭关修行中......

reply all(2)
巴扎黑

There are two methods:
The first one is all implemented with nginx. First, you need to know the IP address rules of Guangdong Province, and then
location / {

if ( $query_string ~* 你的正则表达式匹配 ) {

  deny all;

}

............

Another way to implement in-program control, the general idea is similar

漂亮男人

geoip module

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template