AWS Builder Center

My First AWS EC2 Web Server: From Launch to Hosting

A beginner-friendly walkthrough of how I launched an AWS EC2 instance, configured security group rules, installed Apache, and hosted a simple HTML webpage.

My First AWS EC2 Web Server

As part of my cloud computing and DevOps learning, I recently deployed my first web server on Amazon EC2.

1. Launching the EC2 Instance

I created an EC2 instance and selected a suitable instance type for the lab. I configured the security group to allow the required network traffic.
For SSH access, I allowed port 22 from my own IP address.
For the web server, I allowed HTTP traffic on port 80.

2. Connecting to the Instance

After launching the instance, I connected to it using SSH and started configuring the server.

3. Installing Apache

I installed the Apache HTTP server on the EC2 instance.
Once Apache was running, I created a simple index.html file containing my webpage content.

4. Testing the Web Server

After configuring Apache, I opened the EC2 instance's public IP address in a browser.
The HTML page loaded successfully, confirming that the web server was accessible over HTTP.

5. What I Learned

This hands-on lab helped me understand:
  • How EC2 instances work
  • Security groups and inbound rules
  • SSH access
  • HTTP and port 80
  • Basic Linux server administration
  • Hosting a webpage on a cloud VM

Conclusion

This was my first practical experience deploying a web server on AWS EC2. It gave me a better understanding of how cloud virtual machines can be configured and used to host applications and websites.
I plan to explore other AWS services such as S3, IAM, RDS, and CloudWatch as I continue learning cloud computing.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article