DEV Community

IBRAHIM AKANMU
IBRAHIM AKANMU

Posted on

Setting Up NGINX on Ubuntu for DevOps Stage 0

I'm glad to be part of the HNG DevOps Internship again this year, I was tasked with setting up and configuring NGINX on a fresh Ubuntu server. This task aimed to demonstrate my ability to work with web server configurations and deliver a functional web server.

Approach to Completing the Task

I began by creating a new Ubuntu server. After successfully logging in via SSH, I updated the package list and installed NGINX with the following commands:

sudo apt update
sudo apt install nginx -y

after the installation, I started the NGINX service and enabled it to run on boot.

sudo systemctl start nginx
sudo systemctl enable nginx

I then created a custom HTML page at /var/www/html/index.html with the message: Welcome to DevOps Stage 0 !

To enhance the page, I added CSS to center the text and set a light blue background color.

Challenges Faced

While trying to setup, I encountered a couple of challenges. Initially, I couldn't access the server in my browser due to firewall settings blocking HTTP traffic. I resolved this by allowing NGINX through the firewall:

sudo ufw allow 'Nginx Full'

Additionally, I faced a permissions issue when editing the HTML file, which I overcame by using sudo to gain the necessary access.

Learning and Professional Goals

This task has help in refreshing my understanding of web server management and configuration. It jumpstarts my skills in using Linux commands and working with NGINX, which are essential for a career in DevOps. This experience aligns with my goal of becoming a proficient DevOps engineer, as it provided hands-on practice with critical tools in the field.

References

Linux Developers - HNG is committed to connecting talented Linux developers with organizations seeking expertise in Linux systems. This role is crucial for managing server environments, ensuring system stability, and optimizing performance, which are essential skills in the DevOps landscape. checkout this link below

https://hng.tech/hire/linux-developers

DevOps Engineers - HNG recognizes the growing demand for DevOps engineers who can bridge the gap between development and operations. By fostering collaboration and automation, DevOps engineers play a vital role in enhancing software delivery and operational efficiency, making them indispensable in today’s tech-driven world.

https://hng.tech/hire/devops-engineers

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (2)

Collapse
 
klau_erik_b1846e52d93d714 profile image
Klau Erik

Thanks!

Collapse
 
maverick42 profile image
IBRAHIM AKANMU

you welcome

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay