Skip to content

Bad Gateway error (ELA and NGINX container)

0

Hello, I have an NGINX container, which listens on port 80. It is behind an ELB, which redirects from port 80 to 443. When I use the redirection the error of 502 - Bad Gateway occurs. But when I remove the redirect the service responds normally. I've already increased the ELB time and container memory, but the error persists. Can anyone help with this case?

3 Answers
0

The configuration is correct, because when I take the redirect to https the service responds. That is, when I hit port 80 for http and not https the service responds.

answered 3 years ago
  • I use the redirection the error of 502 - Bad Gateway occurs.

    Doesn't redirecting to HTTPS result in a 502 error?

  • Doesn't. The servise return normaly, but without SSL certificated

  • With redirect to HTTPS (443) result in a 502 error. Without redirect to, doesn't. The service return normaly.

0

What are the ALB redirect settings?
ALB redirects can be configured in the following ways.
https://repost.aws/knowledge-center/elb-redirect-http-to-https-using-alb

EXPERT
answered 3 years ago
0

I found the problem. One of the ELB rules was not healthy. And that rule was before the rule that was in trouble. I put in the rule I was working on first and it worked.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.