Installing and Configuring NGINX as an HTTP Server

1.25 hours
  • 3 Learning Objectives

About this Hands-on Lab

NGINX is one of the tools that the modern web is built upon. In this activity, we will deploy NGINX as an HTTP server, with a single virtual host, for serving a static content. The initial deployment of NGINX on a new server is the first step in mastering the use of this powerful tool.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Add Official NGINX Yum Repository

Install NGINX from the official repository.
This requires creating a new repository file, /etc/yum.repos.d/nginx.repo.

Start and Enable NGINX Service

Start the nginx service, and enabled it to start after a server reboot.

Serve Content From `/var/www/` For Requests To ``

Create a virtual host for the domain that serves out files in the directory

Additional Resources

As system administrators with our organization, we've been tasked with setting up a new web server to serve static web assets. Our organization mandates the use of CentOS 7 for all new servers, and we've decided to deploy the newest stable build of NGINX from the official NGINX repository.

After we've installed NGINX, we'll need to ensure that it's running and will run automatically after a reboot. Finally, we must configure the server to handle requests for from the directory /var/www/ Once we've tested the configuration, we're ready to notify the web developers in our organization.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?