Nginx + AWS ELB运行状况检查

时间:2020-02-22 15:36:45

标签: amazon-web-services nginx

我当前正在尝试使用AWS ELB在Nginx服务器上设置运行状况检查,但是无法正确配置它。我过去曾经这样做过,但是这次我不断重复得到以下内容:

nginx_1  | 172.31.51.43 - - [22/Feb/2020:15:29:11 +0000] "POST /agent/v1/d4417c82-03a1-4823-9274-4bfa727442e9/heartbeat HTTP/1.1" 404 153 "-" "Go-http-client/1.1" "10.10.64.54, 68.115.216.198"
nginx_1  | 2020/02/22 15:29:11 [error] 7#7: *35 open() "/etc/nginx/html/agent/v1/b745ff52-691f-4c6c-ab8a-60d6d1ae4c1d/heartbeat" failed (2: No such file or directory), client: 172.31.51.43, server: , request: "POST /agent/v1/b745ff52-691f-4c6c-ab8a-60d6d1ae4c1d/heartbeat HTTP/1.1", host: "agent.service.itsupport247.net"

我当前的设置如下:

Nginx配置文件(mysite.template):

location /elb-status {
   access_log off;
   return 200 'A-OK!';
   add_header Content-Type text/plain;
}

AWS运行状况检查设置:

path: /elb-status
success code: 200

上面的错误为什么寻找来自/etc/nginx/html/agent/v1/的{​​{1}}

0 个答案:

没有答案