NGINX Setup: DevOps Stage 0

Introduction
As part of the DevOps Stage 0 internship task, I was challenged to set up and configure NGINX on a fresh Ubuntu server hosted on a cloud provider. This exercise aimed to test foundational DevOps skills like cloud infrastructure provisioning, server management, and web server configuration. Here’s a detailed account of my experience, challenges, and takeaways.
Approach to the Task
The task required provisioning a cloud server, installing NGINX, and configuring it to serve a custom HTML page. Here’s my step-by-step approach:
Signing Up for a Cloud Provider
I chose AWS as my cloud platform (though providers like Google Cloud or Azure work similarly). After creating an account, I navigated to EC2 to launch an Ubuntu server instance.Selected Ubuntu 22.04 LTS as the OS.
Configured a t2.micro instance (free tier eligible).
Set up SSH key pairs for secure access.
Added firewall rules (security groups) to allow HTTP (port 80) and SSH (port 22) traffic.
Connecting to the Cloud Server
Using the terminal, I connected to the instance via SSH:ssh -i "my-key.pem" ubuntu@<server-public-ip>
Installing NGINX
After accessing the server, I updated the package list and installed NGINX:sudo apt update sudo apt install nginx -y
Verified the service was running:
sudo systemctl status nginx
Creating the Custom HTML Page
I replaced the default NGINX index file at/var/www/html/index.html
with a simple HTML page:<p>Welcome to DevOps Stage 0 - Olusi Boluwatife/Grim</p>
Testing the Configuration
I usedcurl
localhost
to confirm the page loaded. Finally, I accessed the server’s public IP in my browser to validate external accessibility.
Challenges Faced
While the task built my confidence, I encountered several hurdles:
Cloud Provider Setup Complexity
As a first-time AWS user, the EC2 dashboard felt overwhelming. I accidentally misconfigured security groups initially, blocking HTTP traffic. Referencing AWS’s documentation helped me correct the rules.SSH Key Permissions
My first SSH attempt failed due to incorrect key file permissions. Fixing it required:chmod 400 my-key.pem
Firewall Conflicts
The Ubuntu server’s built-in firewall (ufw
) was inactive by default, but AWS security groups handled traffic. Later, enablingufw
without allowing NGINX caused conflicts. I standardized on AWS security groups to avoid confusion.
How This Task Contributes to My Goals
This task aligns with my aspiration to become a DevOps Engineer by:
Introducing Cloud Infrastructure: Provisioning servers on AWS gave me hands-on exposure to cloud platforms, a cornerstone of modern DevOps.
Strengthening Deployment Skills: Configuring NGINX on a remote server mirrors real-world application deployment workflows.
Building Troubleshooting Acumen: Debugging SSH and firewall issues sharpened my problem-solving skills.
As emphasized in this work so far, cloud expertise is vital for designing scalable systems. Similarly, the Infrastructure Engineer’s role underscores the importance of server management—skills I practiced here.
Key Takeaways
Cloud Agnosticism: While I used AWS, similar principles apply to Azure, Google Cloud, etc.
Security First: Properly configuring SSH and firewalls is non-negotiable.
Automation Potential: Manual setup works for small tasks, but tools like Terraform could automate cloud provisioning in the future.
Conclusion
This task was a holistic introduction to cloud DevOps. From provisioning infrastructure to deploying a web server, I gained practical insights into the lifecycle of application hosting. I’m eager to explore advanced areas like CI/CD pipelines and Kubernetes, as highlighted in HNG Tech’s hireable roles, and contribute to building robust, cloud-native systems.
References
HNG Tech - AWS Solutions Architects: Explore Role
HNG Tech - Infrastructure Engineers: Learn More
Subscribe to my newsletter
Read articles from Grim directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Grim
Grim
I am