Nginx Static Site Setup for Beginners

Nginx is reliable for static websites because it reads files from disk and returns them quickly when the domain, root folder, and fallback rules are configured clearly.

Minimal server block

Point the right domain to the right static folder, define index handling, and keep access and error logs separate per site.

Enable and test

Create the config, link it into sites-enabled, run nginx -t, and reload only after the test passes.

Common mistakes

Avoid wrong root paths, unreadable files, premature reloads, inappropriate fallback rules, and missing per-site logs.