Back to articles
Launch a Simple EC2 Instance, Run a Web Server & Access It from the Internet - CA28

Launch a Simple EC2 Instance, Run a Web Server & Access It from the Internet - CA28

via Dev.to TutorialMohith

one of the first things you should try is launching an EC2 instance and hosting a simple website. In this guide, we'll create an EC2 instance, install a web server, and access it from the public internet. Step 1 — Launch EC2 Instance Go to AWS Console Open EC2 Dashboard Click Launch Instance Configure: Name My-Web-Server AMI Amazon Linux 2023 Instance type t2.micro (Free tier) Step 2 — Configure Security Group Allow SSH and HTTP traffic: type - ssh & http is in port 22 & 88 sorce is my ip and anywhere This allows: SSH login Public web access Step 3 — Connect to EC2 Use EC2 Instance Connect web browser on console : throught the above connect option present in it Step 4 — Install Apache Web Server Update packages sudo yum update -y Install Apache sudo yum install httpd -y Start server sudo systemctl start httpd Enable auto start sudo systemctl enable httpd Step 5 — Create Simple Website Create index file: sudo nano /var/www/html/index.html Enter the html code <!DOCTYPE html> <html> <head

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles