Nginx and Apache serve a large share of the web, and most production problems with a site – broken redirects, mixed content, 502 errors, slow static files – trace back to a few lines of their configuration. This course teaches you to read and write those configurations properly, with HTTPS, reverse proxying, PHP and caching set up the way you would on a real server.
What you'll learn
- How Nginx and Apache handle a request: processes, workers and configuration contexts
- Server blocks and virtual hosts for several domains on one server
- Free HTTPS certificates with Let's Encrypt and Certbot, auto-renewal and modern TLS settings
- Nginx as a reverse proxy for Node.js, Python and other app servers, including WebSockets
- Running PHP with PHP-FPM on Nginx, and with Apache's event MPM
- Redirects and rewrites:
return,rewrite,try_files,mod_rewriteand.htaccess - Gzip and Brotli compression, browser caching headers and static file performance
- Nginx proxy and FastCGI caching for dynamic sites
- Security headers, rate limiting, basic auth and hiding server details
- Reading access and error logs to diagnose 403, 404, 502 and 504 errors
Who it's for
- Developers who deploy their own apps on a VPS or cloud server
- WordPress and PHP developers who want to tune hosting beyond a control panel
- Junior system administrators taking over existing web servers
Prerequisites
- Comfortable on the Linux command line, including editing files and using
sudo(see Linux Command Line for Developers) - A basic understanding of DNS and HTTP
- A Linux virtual machine or VPS to practise on
Outcomes
By the end of this course you will be able to:
- Host several sites on one server with HTTPS and correct redirects.
- Put Nginx in front of an application server as a reverse proxy.
- Speed up a site with compression, caching headers and server-side caching.
- Diagnose common web server errors from the logs instead of guessing.
Course outline
| Module | Topic |
|---|---|
| 1 | How web servers work: Nginx and Apache architectures |
| 2 | Installing, testing and reloading configuration safely |
| 3 | Server blocks and virtual hosts |
| 4 | HTTPS with Let's Encrypt and modern TLS |
| 5 | Redirects, rewrites and clean URLs |
| 6 | Reverse proxying app servers and WebSockets |
| 7 | PHP-FPM with Nginx and Apache |
| 8 | Compression, caching headers and static assets |
| 9 | Proxy and FastCGI caching |
| 10 | Security headers, rate limits and access control |
| 11 | Logs and troubleshooting |
| 12 | Project: a multi-site server with an app and a WordPress site |
FAQ
Should I learn Nginx or Apache?
Both are still widely used, and you will meet each in real jobs. Nginx is the more common choice for new setups and reverse proxies; Apache remains common on shared hosting and older stacks. We teach them side by side.
Does the course cover Caddy or Traefik?
We compare them briefly, since they automate HTTPS nicely, but the depth is on Nginx and Apache.
Is this useful if I deploy to a managed platform?
Less so, as the platform handles the web server. It is most useful when you run your own server – see Hosting Web Apps on a VPS for the wider setup.
How do I join?
Get in touch and we'll share the current format, schedule and enrolment details.