Nginx Config Generator
Generate a complete Nginx server block — SSL, reverse proxy, PHP-FPM, gzip, caching, and security headers.
About this tool
The Nginx Config Generator builds a ready-to-use server {} block from a simple form, so you don't have to hand-copy boilerplate from old projects. Toggle the pieces you need — a static site root, PHP-FPM handling, SSL termination, a reverse proxy to a backend service, gzip compression, long-lived caching for static assets, baseline security headers, or rate limiting — and get syntactically correct, properly ordered directives instantly.
Each toggle produces the directives real production configs use: SSL blocks include a redirect from port 80 to 443 plus modern ssl_protocols and ssl_ciphers; the reverse proxy block sets the full set of X-Forwarded-* headers and WebSocket upgrade headers; static asset caching matches common JS/CSS/image extensions with a 30-day Cache-Control; security headers include X-Frame-Options, X-Content-Type-Options, a CSP placeholder, and Strict-Transport-Security when SSL is enabled. Because limit_req_zone must live in the http{} context rather than server{}, the generator adds a clearly commented snippet showing exactly where that line belongs, rather than silently producing a config that fails to reload.
Everything runs as pure string templating in your browser — no data is sent anywhere. Use Copy to grab the config, or Download to save it directly as nginx.conf. This is a fast starting point for a real deployment, not a substitute for testing with nginx -t before reloading a production server.
