Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Steps to setup AWS web server.  (Read 14084 times)

0 Members and 1 Guest are viewing this topic.

aravindm

  • Guest
Steps to setup AWS web server.
« on: June 10, 2018, 03:32:45 pm »
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: [Select]
# yum -y install httpd php mysql php-mysql
b. Turn on http service using chkconfig so that httpd will started automatically after reboot of the server.

Code: [Select]
#chkconfig httpd on
c. Start the http or web server service.

Code: [Select]
# /etc/init.d/httpd start
d.  Now we need to make sample index.html file so that it gets displayed whenever we tried to access web server.

Code: [Select]
vi /var/www/html/ index.html
and insert below contents in it and do save and quit.

Code: [Select]
<html>
<head>
<title>UxTechno</title>
</head>
<body>
<p><b>Welcome to LinuxRoutes.com Webserver!!!!</b></p>
</body>
</html>

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.

 ;)