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
asked 9 months ago697 views
2 Answers
0
Accepted Answer

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
EXPERT
answered 9 months ago
profile picture
EXPERT
reviewed 9 months ago
profile pictureAWS
EXPERT
reviewed 9 months ago
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
EXPERT
answered 9 months ago
profile pictureAWS
EXPERT
reviewed 9 months ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions