由于 Target.ResponseCodeMismatch 错误,我的应用程序的健康状态为严重。
我已尝试在此aws 指令中的后端未配置重定向。我已经在 eb config 上将端口更改为“443”,将协议更改为“HTTPS”并重新部署。它将 Health Status 更改为 Ok,但是当我访问我的 url 时,我只获得了“Index of”页面
这是eb status --verbose返回的内容:
Description: Health checks failed with these codes: [301]
Reason: Target.ResponseCodeMismatch
Run Code Online (Sandbox Code Playgroud)
这是来自eb config:
AWSEBV2LoadBalancerListener.aws:elbv2:listener:default:
DefaultProcess: default
ListenerEnabled: 'true'
Protocol: HTTP
Rules: null
SSLCertificateArns: null
SSLPolicy: null
AWSEBV2LoadBalancerListener443.aws:elbv2:listener:443:
DefaultProcess: default
ListenerEnabled: 'true'
Protocol: HTTPS
Rules: null
SSLCertificateArns: arn:aws:acm:us-east-2:XXXX:certificate/XXXXXX
SSLPolicy: ELBSecurityPolicy-XX-XX-XXXX
aws:elasticbeanstalk:environment:process:default:
DeregistrationDelay: '20'
HealthCheckInterval: '15'
HealthCheckPath: /
HealthCheckTimeout: '5'
HealthyThresholdCount: '3' …Run Code Online (Sandbox Code Playgroud)