Reputation: 557
Usecase:- ON my Ec2 instances I am running 3 docker containers which are serving webpages on port 7474,5001,5002.
I created an ALB and attached my EC2 instance as TargetGroup but it shows unhealthy all the time. (that is one problem)
Second problem:- When I am adding LB Rules it's not working as expected.
my example rule is:-
under IF block:- amundsen-nonprod.xyz.com
under Then block :- Redirect to > #{protocol}://amundsen-nonprod.xyz.com:7474/?#{query}
Similarly need to create Rule for 5001,5002.
port-based routing is possible in ALB?
OR
I need a reverse proxy between ALB and EC2 Instance where I will configure proxy pass and achieve this solution or some straight forward solution
Upvotes: 1
Views: 1277
Reputation: 238867
You can't do this under one listener. Instead you need different listeners. So if you need three ports (7474, 5001 and 5002), then you need three listeners, one for each port.
Upvotes: 2