HTTP 404 error from ALB

0

I have an ALB with a target group with two EC2 instances running Apache with a simple hello world index.html. Both the instances are healthy and accessible using their public IP. If I configure the listener default rule to the target group it works fine. But if I configure the same target group using a path based rule like '/product', it gives 404 error. What can go wrong?

Velu
질문됨 10달 전793회 조회
2개 답변
0
수락된 답변

Setting a path based rule like /product simply means that any request that has a URI ending in /product would now be forwarded to your target group. It does not rewrite the URI.

Your Apache Server presumably would not have a document to serve for http://<your-domain/product and therefore returns a 404 to the ALB.

AWS
전문가
답변함 10달 전
profile picture
전문가
검토됨 10달 전
profile pictureAWS
전문가
검토됨 10달 전
0

Hello.
Is there a directory named "/product" in your target EC2 path?
If there is no content in this directory, a 404 error will be generated.

profile picture
전문가
답변함 10달 전
profile pictureAWS
전문가
검토됨 10달 전
  • I understand your answer also means the same but I couldn't understand immediately. With additonal information from Max's answer it was a bit clearer. Thanks anyway.

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

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

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

관련 콘텐츠