Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

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.
share|improve this answer
    
So that means I have to put all the web files on one instance? Won't that mean that each domain will share the same resources? - slowing down the server? –  John Aug 15 '11 at 17:42
    
@John: Depending on what your domains are doing, many domains can be hosted on a single instance. When you need to scale above one instance then you should assess what needs to be scaled and take appropriate action. –  Iain Aug 15 '11 at 17:47
    
@Iain, Can you elaborate on step 2? Would that be in GoDaddy for example? What would be example values for host and points to? Also, what should be the value of the A record on the second domain? –  mgPePe Jul 30 at 8:54
    

For web sites, the only time you absolutely need multiple IP's is when you're doing SSL (HTTPS) for multiple sites.

share|improve this answer
  1. Point all your sites to a single IP address.
  2. Using your web server, create virtual hosts. This means the web server resolve your site based on the name of the site.

What web server are you running?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.