Nginx 如何限定IP访问
在nginx.conf中的server限制段中.deny IP.表示需要限制该IP不可访问.allow IP表示权该IP可以访问.
![](https://images0.cnblogs.com/blog2015/636544/201506/211647136075905.jpg)
如上图.表示阻止192.168.1.122的IP的访问.那当然也可以编辑成192.168.1.1/24网段.
在nginx.conf中的server限制段中.deny IP.表示需要限制该IP不可访问.allow IP表示权该IP可以访问.
如上图.表示阻止192.168.1.122的IP的访问.那当然也可以编辑成192.168.1.1/24网段.