Hosting Static Website in Linux (AWS EC2) in 3 Simple Steps:

Hosting Static Website in Linux (AWS EC2) in 3 Simple Steps:

·

1 min read

Prerequisites: Enable allow port 80 from security groups, watch below video to allow port 80.

  1. Update Linux

     sudo yum update
    
  2. Install Webserver (Web Package HTTPD from Apache)

     sudo yum install httpd
    
  3. Start Webserver

     sudo service httpd start
    

Finally, Check on any Browser using Public IP:

Run the below command to check your Public IP:

curl https://checkip.amazonaws.com

Output:

Edit "index.html" file:

Goto "cd /var/www/html" folder and edit the "index.html" file:

Goto HTML Directory
cd /var/www/html

Edit index.html file
sudo vi index.html

Sample Website Script:
<h1> Welcome to ABHICS </h1>

Output:

keep practicing and keep smiling.

Thank you

Yours Loving Dev

#Dev1289