想不通这个!
操作系统:CentOS 6.6(最新)
使用我的 nagioscheck_http
检查(或 curl)查询通过 HAProxy 1.5 提供的 SSL 站点时,我收到以下 503 错误。
[root@nagios ~]# /usr/local/nagios/libexec/check_http -v -H example.com -S1
GET / HTTP/1.1
User-Agent: check_http/v2.0 (nagios-plugins 2.0)
Connection: close
Host: example.com
https://example.com:443/ is 212 characters
STATUS: HTTP/1.0 503 Service Unavailable
**** HEADER ****
Cache-Control: no-cache
Connection: close
Content-Type: text/html
**** CONTENT ****
<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>
HTTP CRITICAL: HTTP/1.0 503 Service Unavailable - 212 bytes in 1.076 second response time |time=1.075766s;;;0.000000 size=212B;;;0
[root@nagios ~]# curl -I https://example.com
HTTP/1.0 503 Service Unavailable
Cache-Control: no-cache
Connection: close
Content-Type: text/html
然而。我可以通过任何浏览器正常访问该站点(200 OK),也可以curl -I https://example.com
从另一台服务器访问:
root@localhost:~# curl -I https://example.com
HTTP/1.1 200 OK
Date: Wed, 18 Feb 2015 14:36:51 GMT
Server: Apache/2.4.6
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Pragma: no-cache
Last-Modified: Wed, 18 Feb 2015 14:36:52 GMT
Content-Type: text/html; charset=UTF-8
Strict-Transport-Security: max-age=31536000;
HAProxy 服务器在 pfSense 2.2 上运行。
我看到 HAProxy 从其他地方为 nagios 和 HTTP/1.1 返回 HTTP/1.0。那是我的check_http' plugin causing this or is it
卷曲吗?
我的服务器只是没有发送 HOST 标头吗?如果是这样,我该如何解决这个问题?