Skip to main content

Core Foundations

This module builds the mental model you need before touching any configuration. Understanding how Nginx works internally makes every later decision — server blocks, locations, PHP-FPM, reverse proxy — make immediate sense.

Why Start Here

Many Nginx problems (502 errors, permission issues, config not applying) trace back to a weak mental model. Know the process architecture and file layout first.


What You Will Learn

  • What Nginx is and when to choose it over Apache or OpenLiteSpeed
  • How the master/worker process model works
  • How to install Nginx on Ubuntu/Debian and RHEL-family systems
  • Where every important file lives under /etc/nginx/
  • How to validate config, reload, and restart safely from the CLI

Topics in This Module


Best Practices

  • Always run sudo nginx -t before reloading — it validates syntax without disrupting traffic
  • Use conf.d/ or sites-available/ + sites-enabled/ symlinks for per-site organization
  • Know the difference between reload (graceful, no downtime) and restart (drops connections)
  • Read /var/log/nginx/error.log first when anything goes wrong

Success Checkpoint

By the end of this module you should be able to explain what the Nginx master process does, where configs live, how to test config syntax, and how to apply changes without dropping connections.