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

I have a CentOS instance. Is it possible for multiple domains / subdomains to share that single instance and on my Apache server i will have separate folders for each domain. How do I start doing this and how would I map my subdomains to the instance.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You should read up on Name Based Virtual Hosting. Get an elastic IP address for your instance. Create a DNS entry that points each domain name to the elastic IP address. Create a virtual host for each domain.

share|improve this answer

Sure, EC2 is no different from any other server in that regard. You setup separate virtual hosts for each domain, and then modify the DNS entries for the domains to point to the public IP address of the EC2 instance. You'll probably want to get an Elastic IP so that your public IP address doesn't change every time your EC2 instance reboots, and an EBS volume to put all the content onto so you don't have to re-roll your base image every time your vhost's content changes.

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.