[alibaba/tengine]使用tengine健康检查模块一直404。求大神指教,谢谢

2024-06-26 551 views
9

访问localhost会出现 image 但是访问配置的健康检查页面一直404. 修改的nginx.conf如下: upstream test { server 192.168.80.11:8080 weight=2; server 192.168.80.12:8080 weight=1; check interval=3000 rise=2 fall=5 timeout=1000 type=http; check_http_send "HEAD / HTTP/1.0\r\n\r\n"; check_http_expect_alive http_2xx http_3xx; }

location /test { check_status; access_log off; } 第一次用,都是按照网上找的教程,一直报错,求大神指教,谢谢

回答

8

麻烦贴一下tengine的全部配置。 然后执行如下命令返回什么结果?

curl -v -0 -I http://192.168.80.11:8080/
0

试试 check_http_send 'HEAD / HTTP/1.1\r\nConnection: keep-alive\r\nHost: foo.bar.com\r\n\r\n';