Home  >  Q&A  >  body text

How nginx restricts illegal access to someone’s area

阿神阿神2681 days ago531

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-05-16 17:14:51

    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

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-16 17:14:51

    geoip module

    reply
    0
  • Cancelreply