0% found this document useful (0 votes)
5 views

lab2

The document outlines the steps to host a website on an Amazon EC2 instance, starting with launching the instance and configuring it as a web server. It details the commands needed to connect to the instance, install necessary packages, and upload website files. Finally, it instructs on creating an index.html file to serve as the homepage of the hosted website.

Uploaded by

saiganesh.k
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)
5 views

lab2

The document outlines the steps to host a website on an Amazon EC2 instance, starting with launching the instance and configuring it as a web server. It details the commands needed to connect to the instance, install necessary packages, and upload website files. Finally, it instructs on creating an index.html file to serve as the homepage of the hosted website.

Uploaded by

saiganesh.k
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/ 1

Lab 2: Hosting a Website on Amazon EC2 Instance

Objective: Launch an EC2 instance, configure it as a web server, and host a website.
Step 1: Launch an EC2 instance
Start -> AWS console -> EC2 -> Create an Instance -> Launch Instance -> Name -> Select Free
Tier AMI -> Select Free Tier Instance Type - > Set KeyPair Name -> Mark all Networking
Protocols (SSH, HTTPS, HTTP) -> Launch Instance.
Step 2: Connect to the EC2 Instance and host Website
Click on Connect -> Select EC2 Instance Connect -> Click on Connect
(Before that visit to free css website, click on any template and copy the .zip link of that
particular template)
Step 3: Commands to Write on the terminal for creating the connection
sudo su –
yum update -y
yum install -y httpd
systemctl status httpd
mkdir temp
cd temp
wget copy the .zip link
ls -lrt
unzip name of zip file
ls -lrt
cd to another folder other than .zip
to connect server into webserver
mv * /var/www/html/
cd /var/www/html/
systemctl enable httpd
systemctl start httpd

Step 4: Copy the public id and paste it on URL


Create your own index.html file and host it on a website
cd /var/www/html/
vi index.html
insert key press to write and :wq to save and exit
cat index.html
service httpd start

You might also like