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.

2개 답변
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
전문가
답변함 2달 전
profile picture
전문가
검토됨 2달 전
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
답변함 2달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠