什么可能导致ECS容器在健康检查中发送404状态码?我目前有一个 php-nginx docker 容器,它位于托管我们网站的 EC2 实例中,但是,由于健康检查失败,容器会不断旋转,除非我故意将状态代码健康检查设置为 404,然后使网站可访问在浏览器中,但当我从 EC2 实例主机向容器的 IP 地址发送 curl 请求时仍然发送 404 状态代码。
这里有一些额外的信息:
容器的配置
networkMode: bridge
portMappings:
- hostPort: 0
- protocal: tcp
- containerPort: 80
容器实例的安全组
Inbound:
Custom TCP | TCP | 32768 - 65535 | Load balancer's Security Group
Outbound:
All traffic | All | All | 0.0.0.0/0
负载均衡器的安全组
Inbound:
HTTPS | TCP | 443 | Container instance's Security Group
HTTP | TCP | 80 | Container instance's Security Group
Outbound:
All Traffic | All | All | 0.0.0.0/0