en Peris
en Peris

Reputation: 1717

Point domains to springboot app. running in different ports inside a ec2 instance

I have 2 hosted zone defined in route53: domain1.com, domain2.com, and 2 springBoot app running inside a ec2 instance but in different ports. I would like to know if it is possible to point domain1.com to app1 and domain2.com to app2

Upvotes: 0

Views: 74

Answers (1)

chris
chris

Reputation: 37460

Yes, this is possible.

You have two options: one using a classic load balancer, the other using the Application Load balancer.

You would need two classic load balancers, one for each domain. Then you would associate the appropriate listener / port to each load balancer.

With the Application load balancer, you have the option of doing host-based routing, so you would only need one. You would have two target groups, one for each instance/port combination.

Upvotes: 1

Related Questions