0% found this document useful (0 votes)
10 views11 pages

Step 1: Create An EC2 Instance: Practical 5: Hosting A Static Website Using AWS EC2

This document outlines the steps to host a static website using AWS EC2, starting from creating an EC2 instance to configuring the web server. It includes instructions for setting up a key pair, security group, and updating the system, as well as moving website files to the appropriate directory. Finally, it emphasizes the importance of deleting the EC2 instance after hosting the website.

Uploaded by

tarunagupta2218
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views11 pages

Step 1: Create An EC2 Instance: Practical 5: Hosting A Static Website Using AWS EC2

This document outlines the steps to host a static website using AWS EC2, starting from creating an EC2 instance to configuring the web server. It includes instructions for setting up a key pair, security group, and updating the system, as well as moving website files to the appropriate directory. Finally, it emphasizes the importance of deleting the EC2 instance after hosting the website.

Uploaded by

tarunagupta2218
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Practical 5: Hosting a static website using AWS EC2

Step 1 : Create an EC2 instance

Step 2 : Select or create key pair


Step 3 : Create a security group

Step 4 : Instance successfully initiated


Step 5 : Instance started running

Step 6 : Connect to instance


Step 7 : Open terminal using SSH

Step 8 : sudo su – (get root access)


Step 9 : yum update -y (update the system)

Step 10 : yum install httpd -y (install httpd web server)


Step 11 : systemctl status httpd (check status of web server)
Step 12 : mkdir temp (create temp folder) / wget download-link-zip

Step 13 : unzip downloaded website zip folder


Step 14 : Folder is unzipped

Step 15 : cd unzipped-folder-location / ls -lrt (check contents of folder)


Step 16 : mv * /var/www/html/ (move website folder to destination folder)

Step 17 : ls -lrt (checking moved folder)


Step 18 : Change inbound rules to allow HTTP and HTTPS traffic

Step 19 : Server has started running…


Step 20 : Website is hosted on Public IPv4 address.

Please delete the EC2 instance


after this

You might also like