Multiple Domains on Amazon AWS EC2 – Setup Guide

amazon ec2amazon-web-servicesdomain-name-systemlinux

I am a bit confused on how I can use Amazon AWS to host multiple websites. I under stand how to host a website on there however I am only allowed up to 5 elastic ip addresses. So how would I host more than 5 domains if I cannot assign an ip address to each domain? I could use the Amazon Public DNS address provided which is something like (xxx.xxx.xxx.xxx.compute-1.amazonaws.com) however I cannot use this as a A record when it comes to changing the domain's DNS.

Help?

Best Answer

You only need one elastic IP address. The rest can be achieved using name based virtual hosting.

  • Create an A record that points to your elastic IP address for your main host.
  • Create a CNAME record for each of the additional domains that you want that points to you main domain name A record.
  • Create a virtual host for each domain.