Server block options
Fill in the basics, toggle extras.
Validate with nginx -t before reloading.
Build a ready-to-paste Nginx server block from a few inputs: domain, root path, ports, HTTPS, www redirect, PHP-FPM, gzip and security headers. Copy it straight into sites-available.
Fill in the basics, toggle extras.
Validate with nginx -t before reloading.
An Nginx server block tells Nginx which site a request belongs to (server_name), where its files live (root), and how to handle dynamic content. This builder assembles one from your inputs: listen ports, SSL termination, www redirects, PHP-FPM proxying, gzip compression and security headers, in the canonical order used by production configs.
The output is a starting point, not a finished production config. After pasting it into sites-available and symlinking to sites-enabled, run nginx -t to validate syntax, point the ssl_certificate paths at your real certbot files, and adjust the PHP-FPM socket to match your version.