Unable to Access ALB URL Configured with Host-Based Routing Rule

0

I have set up an Amazon EC2 instance behind an Application Load Balancer (ALB) in the AWS US East region. The ALB DNS name is test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com.

I configured a listener with a rule based on host-based routing, where the condition is "HTTP Host Header is test.test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com".

Despite these configurations, I'm unable to access the URL test.test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com. Encountering DNS_PROBE_FINISHED_NXDOMAIN error in chrome Could someone please assist me in identifying what might be missing or incorrectly configured? Let me know if I need to add more information, Thank you.

gefragt vor 2 Monaten314 Aufrufe
2 Antworten
0

Hello.

"elb.amazonaws.com" is a domain managed by AWS, so you should not be able to create and access a subdomain from this domain.

If there is a possibility that you can connect, try setting the host header using the curl command as shown below.
ALB's host-based routing probably looks at the host header and sorts the connections, so if you set the host header, you may be able to connect.

curl -H 'Host:test.test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com' test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com
profile picture
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
0

If the ALB name is 'test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com', then that is the default name you need to access it with, not a sub-domain e.g. 'test.test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com.'. Change your listener rule to not match on any Host header, but to unconditionally forward to your target group.

I see you had an NXDOMAIN - that is because your client could not resolve 'test.test-alb-XXXXXXXXX.us-east-1.elb.amazonaws.com.'. ALB DNS matching the ALB name is added to DNS for you, but not a sub-domain 'test'.

AWS
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen