Nginx Config Generator
Generate standard Nginx server block configurations.
Generate standard Nginx server block configurations. Enter your numbers and get an instant result.
Enter a domain, set the proxy port or switch to static files, and the page returns a standard Nginx server block for that setup.
This page executes on the tool server: the domain and the options are sent for that one request, the block is rendered there, and nothing is stored. The domain is required; the proxy port, static flag and web root carry defaults, so a minimal form still generates.
The output is a starting block, not a finished deployment: proxying forwards to the port, static mode serves the root directory, and TLS and limits are added where the deployment needs them.
What the generator covers
With static mode off, the block proxies to localhost at the chosen port; with it on, the block serves the root path directly. The domain names the server in both modes, and the defaults — port 8000, /var/www/html — describe a conventional app layout.
Only the server block is generated. Upstreams, caching, TLS termination and access rules are outside the template and stay your decisions.
- Domain required, options defaulted
- Proxy mode or static-root mode
- Conventional ports and paths
What is sent and what is kept
The request carries the domain and the options, and the response carries the block text. Neither is written to disk or logged; regenerating with other options is a fresh request with no memory of the last one.
An empty domain is refused with the reason rather than rendered with a placeholder name, so a generated block always names a real server.
How to use the domain and mode
Enter the domain, which is required, set the proxy port or switch to static files, and press Execute Tool Engine. With static mode off the block proxies to localhost at the chosen port, port 8000 by default; with it on the block serves the web root directly, var www html by default. The domain names the server in both modes.
An empty domain is refused with the reason rather than rendered with a placeholder. Only the server block is generated: upstreams, caching, TLS termination and access rules stay your decisions.
What to Expect
Best for
- Scaffolding a reverse proxy for an app port
- Serving a static directory quickly
- Starting an Nginx config from a known shape
Not ideal for
- TLS termination as generated
- Load balancing across upstreams
- Deploying without reviewing the block
What this tool keeps
- The domain and options exactly as entered
- The same block for the same inputs
- Your inputs private beyond the single request
What may need cleanup
- Adding certificates and redirect rules
- Tuning limits and timeouts for the workload
- Testing the block with nginx -t before reload
Common errors
- Generating without a real domain
- Serving static files while meaning to proxy
- Deploying the starter block unchanged
Example use cases
- Putting Nginx in front of a local app port
- Serving a built static site
- Drafting a server block for review
Sample input
A domain with the default proxy port, generated as a server block.
Sample output
A standard Nginx server block proxying the domain to the port, rendered on the tool server.
Who this is for
- Developers deploying behind Nginx
- Operators scaffolding vhosts
- Anyone starting a server block
Frequently asked questions
What do I need to enter?
A domain name, which is required. Proxy port, static mode and the web root all carry defaults, so a minimal form still generates.
Proxy or static files?
Your choice. Leave static mode off to forward to the proxy port, or turn it on to serve the root directory directly.
Is this production-ready as generated?
It is a standard starting block. TLS, rate limits and logging are decisions you add where your deployment needs them.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.