Reputation: 673
I use AWS ACM to create Certificate for my domain.
And then I create ALB and add listener to HTTPS
While I input domain in browser. I still got 502 Bad Gateway.
Does anyone know how could I fix this?
Upvotes: 0
Views: 317
Reputation: 1
For anyone still looking for a possible solution, I was facing the same issue.
My load balancer was receiving traffic on 443 and 80 port. All traffic on port 80 was redirected to 443. The Certificate Manager would handle the verifications. This traffic was sent to the target group which was associated with the load balancer.
Now, what I did wrong was direct this traffic on HTTPS port (i.e., 443) again, which was sent to the EC2 instances registered in the target group. My EC2 instances would allow HTTPS traffic but the nginx server configuration I used would only accept HTTP. I created the target group with HTTP protocol and it worked.
Hope this helps!
Upvotes: 0