nginx正则匹配admin.php,限制ip登录

location ^~ /admin.php {
    allow xxx.xxx.xxx.xxx; // 允许的ip
    deny all; // 禁止其他
    fastcgi_pass  unix:/tmp/php-cgi.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
    include pathinfo.conf;
}
posted @ 2020-03-03 12:37  TBHacker  阅读(490)  评论(0编辑  收藏  举报