Skip to main content

Command Palette

Search for a command to run...

Day-1:๐Ÿš€ Website Hosting on AWS EC2

Updated
โ€ข1 min readโ€ขView as Markdown
S
๐Ÿš€ ๐€๐›๐จ๐ฎ๐ญ ๐Œ๐ž : "Hi, I'm Santhosh Haridass, a DevOps student passionate about cloud computing and automation. I'm currently learning AWS, Linux, Docker, and CI/CD pipelines, with a focus on automating workflows and building scalable solutions. My goal is to become a skilled DevOps/Cloud engineer, and I'm excited to share my learning journey and projects with the community."

Step-by-Step Guide

I recently completed a project where I hosted a website on an AWS EC2 instance. In this post, I will guide you through the steps I followed to set up the EC2 instance, install a web server, and host the website.

Key Steps

1. Connect to the EC2 Instance via SSH

After launching the EC2 instance, I used SSH to connect to the server:

bashCopy codessh -i filename.pem ec2-user@<ip-address>

2. Switch to Superuser

Once connected, I switched to superuser mode to have full administrative control:

bashCopy codesudo su

3. Update the System

Next, I updated the system's package manager to ensure everything was up-to-date:

bashCopy codeyum update -y

4. Install Apache Web Server

I installed Apache (HTTPD) to enable web hosting on the server:

bashCopy codeyum install httpd -y

5. Start Apache

To start serving the website, I initiated the Apache service:

bashCopy codeservice httpd start

6. Website Access

After starting Apache, the website was successfully hosted and accessible at:


Project Outcome

  • Deployed a Windows EC2 instance.

  • Installed and configured Apache (HTTPD) for website hosting.

  • Learned how to manage and secure AWS instances.

More from this blog

AWS-DevOps-Projects

18 posts