Amazon Web Services

How to setup dynamic website on Amazon Web Server (AWS)

Written by Deep

Going with this blog you are supposed to have basic knowledge of Ubuntu commmands, EC2 instance, VPC security group, Route 53, and a domain  whom we are hosting on AWS (Here we will use for reference).  Lets start hosting a website on EC2 Ubuntu (64bit) machine.

Step 1: 

After launching instance, login to this instance with SSH access.  After successful login we need to upgrade all packages that the Ubuntu OS installed at the time of setting up an EC2 instance.


Step 2 :

Install server to host website on this instance. We are going to install Apache web server for this process.

(Ref : )


Step 3: 

Now apache server installed. We have to setup an . For this we need to create a virtual host on this apache server. The path for the config file of Virtual server is /etc/apache2/sites-available/

Here are two methods to create virtual host

  1. Creating virtual host in a separate file other than 000-default.conf
  2. Creating  virtual host in 000-default.conf


Step 4 (create directory for domain) :

Create index file for your domain


Step 5 (Configure Route 53 for ): 

AWS panel go to Create Hosted Zone in Route 53
After creating hosted zone for you will get  at least 4 DNS (nameservers) from amazon for the domain.

You need to update these nameservers in your domain registrar (as: Godaddy, Hostgator, BigRock etc) panel.


Leave a Comment