2 days (16 hours total)
Day 1 – Installation, Core Concepts, HTTP Basics
1. NGINX Architecture
Master/worker model, event loop, async I/O, phases of request processing, modules (static vs dynamic).
2. Installation
Debian/Ubuntu apt, RHEL dnf/yum, official repo packages, directory layout (/etc/nginx, /usr/share/nginx), service control.
3. Configuration Structure
nginx.conf layout, include tree, contexts (main, http, server, location), config testing, reload vs restart.
4. Static Web Serving
root vs alias, index files, directory listing, MIME types, caching headers, content compression.
5. Locations & Matching Rules
Prefix match, regex match, exact match, order of evaluation, common pitfalls, rewrite vs return.
6. Virtual Hosts
Multiple server blocks, name-based vhosts, IP-based vhosts, default_server mechanics, per-vhost logging.
7. Logging & Troubleshooting
Access logs, error levels, log formats, debugging slow requests, analyzing worker crashes, log rotation.
Day 2 – TLS, Reverse Proxy, Upstreams, Hardening
8. HTTPS & TLS Configuration
Let’s Encrypt, OCSP stapling, HTTP→HTTPS redirect, TLS 1.3, modern cipher suites, HSTS.
9. Reverse Proxy Basics
proxy_pass, buffering, error handling, timeouts, headers, X-Forwarded-For chain, upstream health.
10. Load Balancing
Upstreams, least_conn, IP-hash, weights, active health checks (commercial vs OSS options).
11. Rate Limiting & Request Controls
limit_req, limit_conn, body size limits, timeout tuning, DoS resistance basics.
12. Caching
Proxy caching, cache keys, cache lock, stale-while-revalidate, microcaching patterns.
13. Security Hardening
Removing server tokens, allowed methods, strict headers, preventing path traversal, chroot-style approaches.
14. Integration With PHP-FPM
UNIX vs TCP socket, pool tuning, slow log, fastcgi caching basics, common fastcgi_param mistakes.
15. Automation & CI/CD Integration
Template-based configs, using environment variables, reload safety, zero-downtime rollouts.