发布于 2015-09-20 00:07:49 | 122 次阅读 | 评论: 0 | 来源: 网络整理

Some Hardware Load-balancers such Cisco's CSS and BigIP Products test the readiness of the backend Machines with SYN-ACK-RST.

This behavior causes a 400 error in nginx.

With the GEO Module and the if-Statement you can omit these entries:

http {

  geo  $lb  {
    default      0;
    10.1.1.1/32  1;   # LB IPs

    10.1.1.2/32  1;
  }
 
  # ...
 
  server {

    # ...
    access_log   /path/to/log;
    error_page 400 /400;
 
    location = /400 {

      if ($lb) {
        access_log  off;
      }
      return 400;
    }

  }
}
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务