Amazon web service are one of the most popular for web applications. In some of my last post i explain how to setup amazon instance. Now in this post i explain how to setup multiple domain or  sub domain in your EC2 instance.

Step 1. Configure your EC2 instance or if you not yet created then create one 🙂  .

Step 2. Once your instance created allot elastic IP to your instance. Follow link to learn how to implement.

Step 3. If you buy your domain out side AWS then you need to point your domain to your instance address. In my case i buy domain from godaddy and point it to my instance as shown in below image.

Point domain to ec2 instance, Host multiple website on your EC2 instance AWS

Step 4. Now once you point your domain toward your instance your site is ready. Upload your website to /var/www/html.

Host Multiple Sites on a Single Amazon EC2 Instance

Step 1. Login to your instance with putty.

Host multiple website on your EC2 instance AWS

Step 2. After successful login type following command to edit Apache config file

Step 3. After this add Virtual host and add your domain or sub domain and its location where you kept your files as shown below.

thank you 🙂 hope this will help some one.