location /nacos/ { set $flag 0; if ($remote_addr !~ ^(10.0.37.155|10.0.37.154|10.0.37.156|10.0.37.162|10.0.37.163|10.0.37.164|10.0.37.165|10.0.37.157|10.0.37.158)) {set $flag 1;} if ($host ~ "^hn8.do1.net*$") {set $flag 0;} if ($flag = 1) {return 403;} proxy_pass http://nacosserv; } error_page 403 /403page.html; location = /403page.html{ root html; }