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.
巴扎黑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