Nginx Web Server

Learn Nginx Web Server. This module covers Installing and Verifying Nginx, Configuring Virtual Hosts, Reverse Proxy Setup, Custom Error Pages, Basic Authentication. You will master these essential Linux skills through hands-on labs and real-world challenges.

DevOps EngineerLinuxDevOps

Introduction

Nginx can serve a file, select a site by hostname, route a URL to an application, and enforce access rules—all through configuration that should be tested before it is reloaded. This hands-on course turns those roles into a practical workflow for operating a small web gateway.

You will install and verify Nginx, write server and location blocks, proxy to local backends, customize 404 responses, and protect a path with a hashed password file. The final challenge combines an API proxy, static assets, an internal error page, and an authenticated admin path in one server configuration.

What You Will Learn

  • Install Nginx, manage its service, verify port 80, and test HTTP with curl
  • Map a hostname to a document root with a dedicated server block
  • Route URL paths to a local backend with location and proxy_pass
  • Serve static assets by reasoning about how root combines with a request URI
  • Configure an internal custom 404 page while preserving the 404 status
  • Create hashed credentials with htpasswd and require HTTP Basic Authentication
  • Validate configuration with nginx -t and apply changes with a service reload

Who This Course Is For

This intermediate course is for Linux administrators, DevOps learners, backend developers, and support engineers who need to configure Nginx as a static web server and simple reverse proxy. It is particularly useful if you have run Nginx before but have not yet built and tested server blocks, path routing, error handling, or access controls.

Prerequisites: Basic Linux terminal, package, service, file-editing, networking, and sudo skills. Familiarity with HTTP status codes and URL paths is helpful.

Learning environment: A Debian/Ubuntu-style LabEx Linux terminal with Nginx, curl, htpasswd, prepared local hostnames and content, and local Python or API backend services.

Frequently Asked Questions

Does this course configure HTTPS or production TLS certificates?

No. All requests use local plain HTTP on port 80. TLS certificates, HTTPS redirects, modern cipher settings, load balancing, and caching are outside the course's scope.

Does HTTP Basic Authentication encrypt credentials in transit?

No. htpasswd stores a password hash on the server, and Nginx correctly returns 401 without valid credentials, but Basic Authentication over plain HTTP does not protect credentials on the network. In production it should normally be combined with HTTPS.

Do I build the backend applications in the proxy exercises?

Only the guided lab starts a simple Python static server on port 8000. The final challenge provides the API backend on port 7000 and prepared static/admin content; your task is to configure and verify Nginx as the gateway in front of them.

Teacher

labby
Labby
Labby is the LabEx teacher.