0

I have an application running on an AWS EC2 instance, port 8501. I cannot change the port for multiple reasons. I set up a reverse proxy with nginx using this YT tutorial to redirect http://[domain].com to port 8501.

That works fine.

I obtained an SSL certificate from AWS Certificate Manager and have since learned that AWS certificates only work with certain AWS services, here, here, and here. However, none of those StackOverflow links--or the AWS instruction pages linked therein--actually described how to connect the https request to the Application Load Balancer to the EC2 instance as set forth by my nginx reverse proxy above.

That is, I've more or less followed this YT tutorial to set up a load balancer and attach the SSL certificate obtained from AWS Certificate Manager, but when I type https://[domain].com, I receive a "site can't be reached" error. http://[domain].com still works.

I've tried both HTTP:80 and HTTPS:443 for the Protocol:Port in my Target Group required by AWS Load Balancer. What more do I need to do?

EDIT: added images with ALB settings, etc:

load balancer listeners load balancer listeners

target group overview target group overview

nginx config settings nginx config file

smgeneralist
  • 105
  • 3
  • 8
  • Can you show your config for your target group? What rules do you have set on your ALB, all traffic to the target group? On target group, do your instances are in healthy state? and on which port are you routing the traffic to the instances in your target group? – Riz Sep 18 '22 at 22:48
  • @Riz I'm listening on port 80 and port 443 for all availability zones in the ALB. I've also removed the port 80 listener which made no difference. Target group is healthy, and I'm sending to port 80 (which is what nginx is configured for). I've also attempted to send traffic to port 443; but I don't think that was the solution either. – smgeneralist Sep 19 '22 at 01:27
  • What do you mean by removing port 80 listener which made no difference? It's there and without it how are you routing your traffic to your target group? You also need to have a target group for port 443(need changes to nginx). When you register your EC2 in your target group on port 443, does it get healthy? Have you also whitelisted port 443 on your load balancer? – Riz Sep 19 '22 at 13:41

0 Answers0