Intermediate · 4h 53m · 20 lessons
Web Servers (NGINX & Apache)
Serve, proxy, and secure web traffic with NGINX and Apache.
What you'll learn
- ✦Explain what a web server does and where it sits between the browser and your app
- ✦Configure a web server to serve static files with the right cache headers and compression
- ✦Set up a reverse proxy that forwards to app servers and balances load across them
- ✦Terminate HTTPS at the web server, redirect HTTP to it and harden the edge
- ✦Operate a web server with logs, sensible timeouts and zero-downtime reloads
- ✦Diagnose 502, 504 and other common errors and fix their cause
Part of these career paths
- Backend Developer path · course 14 of 14
- DevOps & Cloud path · course 6 of 6
Certification projects
Build 4 projects to earn your certificate
Hands-on work that proves you can apply what you learned — part of the certificate requirements.
Syllabus
Module 1 · 46m
What web servers do Free
What you'll be able to do
- Can trace a request from the browser through the web server to the app server and the database
- Can tell static from dynamic responses and say which ones the web server sends itself
- Can compare NGINX and Apache and pick one for a given site, with a reason
Module 2 · 55m
Core concepts Locked
What you'll be able to do
- Can choose listen addresses and ports, and fix an "Address already in use" clash
- Can host several domains on one server with server blocks and a safe default
- Can predict which location block handles a request, then test and reload the config
- Can put NGINX in front of an app server as a reverse proxy with the right headers
Module 3 · 59m
Serving real apps Locked
What you'll be able to do
- Can map URLs to files with root, alias and try_files so NGINX sends static files itself
- Can spread requests over app instances with an upstream pool, weights and a suitable method
- Can choose Cache-Control values for build files, HTML pages and private data
- Can switch on gzip for text responses and check the result with curl
Module 4 · 43m
Security & TLS Locked
What you'll be able to do
- Can set up TLS termination in NGINX with a Let's Encrypt certificate and say where the encryption ends
- Can redirect HTTP to HTTPS with a 301 that keeps the path, and turn on HSTS safely
- Can add a rate limit, an upload cap and security headers, and predict what a limit lets through
Module 5 · 45m
Operating it Locked
What you'll be able to do
- Can read access and error logs to find which requests failed and why
- Can set proxy timeouts and predict whether a slow app causes a 502 or a 504
- Can test and reload a config without dropping a single connection
Module 6 · 45m
Putting it together Locked
What you'll be able to do
- Can write and check the standard NGINX setup: redirect, TLS, static files, compression and proxy
- Can diagnose 502, 504, 403 and 413 errors from the error log and the timing
- Can plan hands-on practice and pick the next tool or course after this one