Reputation: 141
I'm trying to setup my website (on AWS). I have a t2.micro instance running on the us-east-1 region, and a Load Balancer (availability zones are us-east-1d and us-east-1c). I bought my domain using route 53, and also used the certificate manager to generate my SSL certificate (which I have attached to the load balancer). My problem is that the load balancer seems to always send me to the root domain and it completely ignores the 2 subdomains I have setup on the EC2 instance. They were working perfectly until I created the ELB. So how can I get the subdomains working with the ELB? Or is this not the proper way of doing it? Can anyone point me to the right direction?
Thanks
Upvotes: 10
Views: 17375
Reputation: 5065
You need to look at the application load balancer's rules. You can direct traffic based on the requested host name, or path. For example you can send app.example.com
to one target group or blog.example.com
to another group. Or you can route paths to individual target groups; for example example.com
goes to your site, but example.com/cart
goes to a microservice running your shopping cart.
Upvotes: 13