Linux > Virtualization

Steps to setup AWS web server.


Step 1. AWS console configuration to setup AWS web server.

     1. On the services Menu, Click on EC2.

     2. Click on Launch Instance.

     3. Please select Following mentioned details.

     a.Select Amazon Linux AMI as below:

     b. On the next step Choose an Instant Type Page, confirm t2.micro is selected and then click Next:Configure Instance Details.

     c. On the next step “Configure Instance Details” Do not change anything unless its very much required.

     d. On the Next Step “Add Storage” Keep the default 8 GB General Purpose SSD option.

     e. On the Next step “Add Tags” . Click on Add tag button and under “Key” value enter Name and for Value column enter “Webserver” as below:

Now Click Next on Configure Security group Button.

     f. In this tab along with ssh port range 22 add one more rule for http port 80, so that we can access http web server index.html webpage as below:

* Click Add rule Button
* In type drop down select “HTTP” as below and click Review and Launch button:

     g. In the next step review all the settings and click Launch button.

      h. In the next step , select key Pair if you have any existing one other wise select new one. Click on I acknowledge check box and click Launch Instances Button.

Now you will notice one instance running in EC2 dashboard as below:

     i. Now select Instance and note down the “Public DNS (IPv4)” value. This is required for login on EC2 instance as well as accessing the webserver.

Now next we need to install webserver program on server for that follow below steps.

Step 2. Ec2 configuration to setup AWS web server.

a. Login to EC2 instance. If you don’t know how to login to Ec2 instance

b.Now install httpd, php, mysql and php-mysql packages required to “setup AWS web server”.

--- Code: ---# yum -y install httpd php mysql php-mysql
--- End code ---

b. Turn on http service using chkconfig so that httpd will started automatically after reboot of the server.

--- Code: ---#chkconfig httpd on
--- End code ---

c. Start the http or web server service.

--- Code: ---# /etc/init.d/httpd start
--- End code ---

d.  Now we need to make sample index.html file so that it gets displayed whenever we tried to access web server.

--- Code: ---vi /var/www/html/ index.html
--- End code ---

and insert below contents in it and do save and quit.

--- Code: ---<html>
<p><b>Welcome to Webserver!!!!</b></p>
--- End code ---

Now try to access the web page using the DNS address noted down during step1-sub-step h. You will get below message in browser.

Above message confirms that we have successfully setup AWS web server.



[0] Message Index

Go to full version