DEV Community

Victor Okafor
Victor Okafor

Posted on

My HNG 12 Debut: Re(learning) Nginx Through a Custom HTML Challenge

Introduction

HNG 12's DevOps track is officially ON! Stage 0 kicked off with a seemingly simple task: configuring Nginx to serve a custom HTML page. But don't let its simplicity fool youโ€”this challenge solidified my understanding of web server configurations, particularly Nginx.

Implementation:

  • Setting up the web server: My site needed a public face, so I spun up an Ubuntu server in Azure โ€“ my cloud of choice. Armed with the Azure CLI, I quickly provisioned the virtual machine.
az vm create --name nginx-serve --resource-group nginx-resource_group --size Standard_B1ls --image Ubuntu22.04 --nsg-rule SSH --admin-username <your_username> --admin-password <your_password>
Enter fullscreen mode Exit fullscreen mode

You can now connect securely to your provisioned resource.

  • Install Nginx: Update package manager and install Nginx:
sudo apt update && sudo apt install -y nginx
Enter fullscreen mode Exit fullscreen mode
  • Confirm that Nginx is running:
sudo systemctl status nginx
Enter fullscreen mode Exit fullscreen mode
  • Alter Firewall:
sudo ufw allow 'Nginx Full'
Enter fullscreen mode Exit fullscreen mode
  • Configure custom HTML page: I navigated to the default web directory and edited the default webpage file:
 cd /var/www/html/*
Enter fullscreen mode Exit fullscreen mode
  • Restart Nginx service:
sudo systemctl restart nginx
Enter fullscreen mode Exit fullscreen mode

As for challenges, I faced no challenges as I went through the task.

Reflection:

This task wasn't just about Nginx; it was a deep dive into web server mastery. I leveled up my configuration skills, troubleshooting prowess, and problem-solving mindset.

This HNG 12 experience is fueling my DevOps ambitions, solidifying my foundation in server administration and automation.

Ready to hire top-tier DevOps talent? Look no further than HNG alumni โ€“ we thrive under pressure, deliver quality, and bring practical skills to the table. Explore the elite HNG talent pool here:
DevOps Engineers
Cloud Engineers

Top comments (0)