This project demonstrates how to launch an Amazon EC2 instance, connect using SSH, install Apache HTTP Server, and host a static website on AWS.
- AWS EC2
- Amazon Linux 2023
- Apache HTTP Server (httpd)
- Linux Commands
- SSH
- Security Groups
- Created an EC2 instance using Amazon Linux 2023.
- Generated and used an SSH key pair.
- Connected to the server using SSH.
- Updated system packages using DNF.
- Installed Apache HTTP Server.
- Started and enabled the Apache service.
- Created a static HTML webpage.
- Configured Security Group rules to allow HTTP traffic.
- Verified website accessibility through a browser.
sudo dnf update -y ➡️ Updates all installed packages on the Amazon Linux server to their latest versions
sudo dnf install httpd -y ➡️ Installs the Apache HTTP web server (httpd) on the EC2 instance.
sudo systemctl start httpd ➡️ Starts the Apache web server service immediately.
sudo systemctl enable httpd ➡️ Configures Apache to start automatically whenever the server reboots.
echo "<h1>Hello from Payal's AWS Server</h1>" | sudo tee /var/www/html/index.htmlUpdated the Amazon Linux server, installed and configured Apache HTTP Server (httpd), started the service, and enabled automatic startup on system boot. 🚀☁️
Successfully hosted a static webpage on an AWS EC2 instance and accessed it through a public IP address.