Nginx禁止通过IP访问网站

将下面代码加到其他server之前

server {
    server_name   _; 
    return 403; #跳转到403页面
}

猜你喜欢

转载自satori.iteye.com/blog/1208283