Home

Linux EC2 Instance Challenge/ EC2 Web Server Challenge: Complete Setup Guide

Project Overview

This project demonstrates the complete setup of an EC2 instance running a web server in AWS. The guide walks through creating a VPC with proper networking, launching an EC2 instance, installing and configuring Apache, and deploying a simple web page.

Task 1: Creating the Lab VPC and Network Settings

Created a VPC:

Create a Public Subnet:

Enable Auto-Assign Public IP:

Create an Internet Gateway:

Update the Route Table:

Create a Security Group:

Task 2: Launching an EC2 Instance

Open EC2 Management Console:

Launch an Instance:

Name and Tags:

Choose an AMI:

Choose an Instance Type:

Configure a Key Pair:

Configure Network Settings:

Add Storage:

Configure Advanced Details:

Launch Instance:

Task 3: Connecting to the Bastion Host

Connect to Bastion Host:

Task 4: Troubleshooting the Misconfigured Web Server

Update Package Index:

sudo yum update -y

Install Apache:

sudo yum install -y httpd

Start Apache Service:

sudo systemctl start httpd

Enable Apache to Start on Boot:

sudo systemctl enable httpd

Verify Apache Installation and Status:

sudo systemctl status httpd

As you can see by active (running) it is running successfully.

Task 5: Deploying and Testing the Web Page

Create and Save HTML File:

sudo nano /var/www/html/projects.html
<!DOCTYPE html> <html> <body> <h1>Alex's re/Start Project Work</h1> <p>EC2 Instance Challenge Lab</p> </body> </html>

Verify File Placement:

ls /var/www/html

Update Security Group Rules:

Access Web Page:

Related Topics

Summary