NGINX config generator
Builds a complete NGINX server block from your domain, TLS, proxy, caching and security-header options.
NGINX config generator
Set the options for the site you're deploying and this tool assembles a ready-to-use NGINX server block: the domain and any aliases, the document root, whether to listen on port 443 with HTTP/2 and redirect plain HTTP to it, and where the certificate and private key live. Turn on reverse proxying to send traffic to an upstream app server — the generated location block forwards Host, X-Real-IP and X-Forwarded-For/-Proto so the app sees the real client address behind the proxy — or serve static files directly with cache headers and an expiration for assets like CSS, JS and images.
Toggle gzip and Brotli compression, a single-page-app fallback that rewrites unknown paths to index.html, and a security-headers block that adds HSTS, X-Content-Type-Options and a Referrer-Policy. Blocking access to hidden files (.env, .git) and setting a custom 404 page, a request body size limit, and access/error log paths round out a config that covers the directives most sites actually need, in the order NGINX expects them. Enabling both the HTTPS redirect and the 443 listener produces two server blocks — one redirecting, one serving — exactly as NGINX requires.
The output is plain NGINX config syntax, ready to drop into a site file under /etc/nginx/sites-available/ or wherever your setup keeps them. Every option maps to real directives — there's no placeholder text left for you to hunt down and replace, beyond swapping in your own domain, upstream address and certificate paths if you haven't already typed them in.
Everything runs locally in your browser: the domain, paths and upstream address you type are used only to build the text you see and are never sent anywhere. Copy the result, download it as a .txt file, or send it back into the input to keep refining it.