2
我有以下後端配置HAProxy的健康檢查:HAProxy的健康檢查不工作,但捲曲返回200 OK
backend php_servers
http-request set-header X-Forwarded-Port %[dst_port]
option httpchk get /health
http-check expect status 200
server php1 internal_ip:80 check
HAProxy的不啓用服務器,但使用curl當我收到200 OK響應。
Command: curl -I internal_ip/health
Response:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 01 Dec 2016 20:53:48 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Access-Control-Allow-Origin: api.flex-appeal.nl
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-transform
爲什麼HAProxy不能將服務器識別爲「UP」?似乎我可以連接得很好。