Nginx Config Generator
Build an nginx server block in seconds.
How to use
- 1 Enter your domain and choose the site type: static, SPA or reverse proxy.
- 2 Fill in the document root or, for a proxy, the upstream URL.
- 3 Toggle HTTPS, www and gzip as needed, adding certificate paths for TLS.
- 4 Copy the generated server block into your nginx sites-available file.
- 5 Test with nginx -t and reload nginx.
About Nginx Config Generator
The Nginx Config Generator turns a handful of choices into a clean, copy-ready nginx server block, so you do not have to remember the exact directive names and ordering every time you stand up a site.
Pick whether you are serving static files, a single-page application or a reverse proxy, fill in your domain and root or upstream, and the generated configuration appears instantly.
Static sites get a sensible try_files rule and an index directive.
Single-page apps fall back to index.html so client-side routing works without 404s on deep links.
Reverse-proxy blocks include proxy_pass plus the forwarding headers you almost always want — Host, X-Real-IP, X-Forwarded-For and X-Forwarded-Proto — so your upstream application sees the real client details.
Toggle HTTPS and the tool emits a TLS server block alongside an HTTP-to-HTTPS redirect, wired to your certificate paths with modern protocol defaults.
Optional switches add the www subdomain and gzip compression for text assets.
Because everything runs locally in your browser, your domain names and file paths never leave your machine, and the output is plain text you can paste straight into a sites-available file.
It is a fast starting point for a new virtual host that you can then tweak by hand for caching, rate limits or extra locations.
FAQ
Does it generate a working HTTPS setup?
It produces a TLS server block with modern protocols plus an HTTP-to-HTTPS redirect. You supply the certificate and key paths; obtain the certificate separately, for example with Certbot.
What is the difference between static and SPA mode?
Static mode returns a 404 for missing paths, while SPA mode falls back to index.html so client-side routes resolve correctly on direct visits and refreshes.
Is my configuration sent anywhere?
No. The config is built entirely in your browser. Your domains, paths and upstreams are never uploaded or stored.