nginx 禁止ip方式访问

添加如下代码:

if ($host ~ "\d+\.\d+\.\d+\.\d") {
    return 403;
}
posted @ 2021-05-24 10:12  fuhaizi  阅读(74)  评论(0)    收藏  举报