DEV Community

Faruq Awe
Faruq Awe

Posted on

Devops Stage 0

As part of my DevOps learning journey, I was tasked with setting up an NGINX web server on a fresh Ubuntu instance hosted on AWS. The goal was to serve a custom HTML page with a welcome message and document the process. Here’s how I tackled it!

Approach
I chose AWS EC2 for this task because of its free tier offering and scalability. Here’s my step-by-step process:

Launched an Ubuntu Server:

  • Created an AWS account, navigated to EC2, and launched a t2.micro instance with Ubuntu 22.04.
  • Generated a .pem SSH key pair for secure access.
  • Ensured the security group allowed inbound HTTP traffic (port 80). Image description

Updated NGINX:

  • Updated packages with sudo apt update and NGINX.

  • Started the service and enabled auto-start with systemctl.
    Image description

Created the Custom Page:

  • Replaced the default HTML file at /var/www/html/index.html with my message: Image description

Tested the Server:

Image description

Challenges & Solutions

Firewall Configuration:

  • Issue: Forgot to enable HTTP traffic in AWS security groups initially.
  • Fix: Edited the EC2 security group to allow inbound port 80.

Editing Files with Sudo:

  • Issue: Permission denied when i tried to edit /var/www/html/index.html.
  • Fix: Learned to use sudo tee to write files with root privileges.

Learning & Professional Growth
This experience aligns with my goal to become a DevOps Engineer, where tasks like server provisioning, automation, and CI/CD pipeline management are critical. As highlighted in the HNG DevOps Engineers page, these skills are essential for optimizing development workflows.

I also see how cloud platforms like AWS are central to modern DevOps. The AWS Solutions Architects role, for instance, requires deep familiarity with EC2 and networking skills.

Completing this task was good and easy. From staring at a terminal to hosting a live webpage, I’ve gained confidence in working with servers. While I still have much to learn, this project solidified my passion for DevOps.
To anyone starting out: Embrace the errors, they’re the best teachers!

References
HNG DevOps Engineers
AWS Solutions Architects

Top comments (0)