使用nginx的nginx_upstream_check模块来检测后端服务器的转态时,设置只允许某段IP访问,发现不生效,不在此网段的IP也可以访问。

原因为在允许IP访问最后一定要加deny all;表示除了上面allow的其他都禁止

配置如下:

    location /status {
        check_status;
        access_log   off;
        allow 10.2.72.26;
        deny all;
    }

最后要加deny all

 

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2021-11-09
  • 2021-04-12
  • 2021-06-27
猜你喜欢
  • 2022-12-23
  • 2021-04-22
  • 2021-08-04
  • 2021-08-12
相关资源
相似解决方案