1. 程式人生 > >nginx限制IP訪問網站

nginx限制IP訪問網站

oot .com 訪問 list name index.php gin wro ip訪問

需求:網站只允許指定IP訪問,其他訪問一律拒絕
server
{
listen 80;
server_name a.com;
index index.html index.htm index.php;
root /var/wwwroot/aaa/;
allow 23.100.1.222;
allow 23.107.17.58;
allow 23.107.17.59;
allow 23.107.17.60;
allow 23.107.17.61;
allow 23.107.17.62;
deny all;

nginx限制IP訪問網站