DEV Community

Musungu (Ruth) Ambogo
Musungu (Ruth) Ambogo

Posted on

Setting Up Nginx: My First HNG12 Project

Introduction

NGINX is a web server, reverse proxy and load balancer used to server static content. The purpose of this task is to install and configure nginx on an Ubuntu server, which is the official stage 0 task of HNG 12 DevOps internship program

Setting up and configuration

  • Setting up the Ubuntu server: I first instantiated an EC2 instance on AWS. After setting it up, I enabled SSH access to connect to it remotely

Steps Taken:

  • Logged into my AWS Management Console.
  • Created a new EC2 instance running Ubuntu.
  • Configured security groups to allow SSH (port 22) and HTTP (port 80) access.
  • Downloaded the private key (.pem file) and connected to the instance using SSH.

  • Installing NGINX: Once inside the server, I installed NGINX using the following command:

bash
sudo apt update && sudo apt install -y nginx

Configuring NGINX to Serve a Web Page

By default, NGINX serves files from /var/www/html.

Challenges

  • While setting up the EC2 instance: I had to do lots of research since it was my first time
  • Using the Nano editor: For some reason, I couldn’t paste into the Nano editor. It took me some time to figure out the correct command.

Platform Engineers
Infrastructure 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 (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

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

Okay