AWS application load balancer 404
I'm following tutorial to create an application load balancer and the listener path is as follow:
LB -> path -> server1 or -> path -> server2
The problem:
I can get to server1 via the LB url ok but when I tried to go to server2 i received 404 page.
If i delete & reconfigure the LB & swap the server around then I can get to server2 but will get 404 if i tried to go to server1.
I can get to both server just fine directly.
Thanks for your help
Solution 1:
I think you're getting 404 because when you access {YourALB}/server1/something the path is passed on to {IntASG}/server1/something instead of {IntASG}/something. If you can check the IntASG access logs you will probably see it there.
IIRC there is a way to remove the routing part of the path before forwarding it on to the backend. Check the ALB docs, it will be described there.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#rule-condition-types
Hope that helps :)