I have an EC2 Instance, and want to add HTTPS to it. I am able to access it using http.
I have added an Application Load Balancer, and enabled the Ports 80 and 443.
I also added the DNS of the ALB in Route 53.
api.example.com alias to the ALB DNS
However, when I access the ALB using HTTP, it works fine. But when I try to do the same using HTTPs, it gives an error "This site can't be reached".
Things I have already done:
Can anyone help me out in this?
It seems that you are missing a listener on port 433 in your ALB or the listener is not properly configured.
If you want to directly expose your ALB to the outside, eg without a CloudFront distribution in front of it, your ALB will need to handle TLS. Proper way of doing this would be to do SSL termination on the ALB and then forward the plain request to your targets. Unless of course there are compliance ready for not being able to so. Among other things, this will make your life easier as you don't have to manage the keys on the targets.
Therefore, you will need to make sure that your listener is properly configured, ie, that is always forwards to port 80, considering that your targets expect traffic on port 80.
Best, Stefan
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.