Nginx Config Generator
Generate an nginx server block with TLS and a proxy pass in your browser.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Generated an nginx configuration with 2 block(s).
How it works
- Wrote a server block for example.com proxying http://backend:3000.
- Added the HTTP→HTTPS redirect.
- Added the 443 listener and referenced the certificate paths.
- Certificate values are file paths, never certificate contents.
- Run `nginx -t -c <file>` yourself to test the config before reloading.
Methodology
- Validate the server name, root, upstream and TLS paths.
- Emit an optional HTTP redirect server block, then the main server block with listener, proxy and headers.
- Reference certificate paths only; never read or emit certificate content.
Usage
- Enter the server name, document root and proxy upstream.
- Toggle TLS and the HTTP→HTTPS redirect; provide certificate paths when TLS is on.
- Copy the generated server block into your nginx config.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
TLS reverse proxy
{
"serverName": "example.com",
"root": "/var/www/example",
"upstream": "http://backend:3000",
"tls": true,
"certPath": "/etc/ssl/certs/example.crt",
"keyPath": "/etc/ssl/private/example.key",
"redirectHttp": true
}Limitations
What the generated block does
The server block listens on 80 or 443, sets `server_name`, optionally serves a root, and proxies `location /` to the upstream with the standard forwarding headers.
Frequently asked questions
- Can I paste my certificate into the tool?
- No. The tool accepts the certificate and key file paths only; it never handles key material.
- Why is the redirect a separate server block?
- A plain `listen 80` server that returns 301 is the conventional way to redirect HTTP to HTTPS without mixing it with the TLS listener.
Sources
- nginx documentation — F5 / nginx
- ngx_http_proxy_module — F5 / nginx
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.