AWS LoadBalancer not redirecting HTTPS (GoDaddy DNS)

0

Hi everyone,

I am trying to configure my AWS ELB but I am having some troubles.
I have the following:

  • 1 EC2 (for testing with Apache and as a VirtualHost I have host.mydomain.com and host1.mydomain.com)
  • 1 ELB (HTTP/HTTPS allowed) - for example it is elb1.aws.com (for example to keep it easy)
  • GoDaddy Subdomains/Domains/DNS

Now, in GoDaddy I created an A record for host.mydomain.com to point to the EC2 to make sure it works. And it does work and I can navigate the website via HTTP/HTTPS.
In GoDaddy I also created a CNAME => host1.mydomain.com that points to the ELB (elb1.aws.com)

If I do a ping of host1.mydomain.com I get the ELB IP. So all good here.

Now, if I use my browser (and the ELB SecGroup is HTTP/HTTPS allow) I get ERR_CONNECTION_REFUSED.

I am not sure why. Anyone have ideas?
How does the AWS ELB forward the traffic? Is there a configuration missing on my side?

Thanks and I look forward to hearing from you.
Rob

已提问 5 年前1190 查看次数
4 回答
0

Hi Roberto,

What type of load balancer is it? ALB? NLB? Classic ELB?

Are you attempting to connect to the load balancer URL via HTTP or HTTPS? If HTTPS, do you have a valid certificate attached to the listener on the load balancer?

Can you please share your load balancer configuration?

Edited by: JayG50 on Sep 30, 2019 11:01 AM

已回答 5 年前
0

Hi Jay,

The load balancer is an Application Loadbalancer.
I have a valid HTTPS certificate and the LoadBalancer imported the certificate without problems.

I am trying to connect to:
host1.mydomain.com that points to the loadbalancer and the ALB should forward the request to the server but apparently it is not.

I can see that the LoadBalancer can definitely reach the EC2 instance as I see:
"GET / HTTP/1.1" 429 6206 "-" "ELB-HealthChecker/2.0"

So the healthcheck works fine.

I might have found an issue with the security group that I am still investigating. Probably the problem is related to that.

Edited by: RobertoS on Sep 30, 2019 2:02 PM

已回答 5 年前
0

Hi Roberto,

You may also want to look at how your target groups are configured and the ports they are listening on when traffic is forwarded from the listener. If your ALB is connecting to the EC2 instances via HTTP but the instances are configured to redirect to HTTPS, you will definitely have connectivity issues. Unless you need end-to-end encryption, you might want to try to disable HTTPS on the EC2 instances and only use HTTP to rule that out as the issue.

It would look something like this:
User -> (HTTPS) ALB -> Forward to Target group -> (HTTP) EC2

已回答 5 年前
0

Yes, I fixed the problem. I had some problem with Security Groups.
Thanks all.

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则