How to host multiple SSL websites on a single EC2 instance using Amazon Elastic Load Balancers

amazon ec2amazon-elbamazon-vpcamazon-web-services

If I have 3 separate websites which all require SSL (separate certificates) that I want to host on the same EC2 instance(s) across multiple availability zones so that we have the ability to scale and be highly available, how do I achieve this using ELBs in my Amazon VPC?

Each site requires a separate IP address, so I have added multiple private IPs to the EC2 instance, but I am unsure how to bind the ELB to a certain IP on the instance.

I was also able to setup multiple ELB pointing to the same instance, but again, I am not seeing any way to bind each ELB to a separate IP on the instance.

If this is not possible, what is the best option?

  • Run each site on a separate EC2 instance / ELB combo (expensive and harder to maintain)
  • Give each site a separate public IP and use Route 53 to do the load balancing (seems like a hack)
  • Use a different load balancer option such as HAProxy that should be able to work like a normal load balancer appliance.

Please help!

Best Answer

I ended up going with a multi domain SSL cert.