NGINX Config Builder
Generate a correct NGINX server block — reverse proxy, static hosting, SSL and redirects — without hand-writing directives.
Server
Location /
Generated config
server {
listen 80;
listen [::]:80;
server_name example.com;
client_max_body_size 10M;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
About this tool
NGINX configuration is powerful but unforgiving: directives must sit in the right context, proxy setups need the right forwarded headers to avoid broken client IPs and redirect loops, and a missing try_files line is the classic reason a single-page app 404s on refresh. This builder assembles a correct server block from a form so you get the boilerplate right.
Add location blocks of three kinds — a reverse proxy (with Host and X-Forwarded-* headers pre-filled), static hosting from a document root (with an optional SPA fallback to index.html), or a redirect with your chosen status code. Turn on SSL to emit listen 443 ssl with your certificate paths, and enable HTTP-to-HTTPS to generate a companion port-80 server that permanently redirects. Optional gzip and client_max_body_size round out the common cases. Everything runs in your browser.
How to use
Set the server basics
Enter the server name (domain) and listen port, or enable SSL to switch to 443.
Add location blocks
Choose reverse proxy, static files or redirect for each path and fill in the target.
Enable SSL and redirects
Turn on SSL with your cert/key paths and add an HTTP→HTTPS redirect if needed.
Copy the config
Copy the generated server block into sites-available and reload NGINX.
Location types
| Type | Generates |
|---|---|
| Reverse proxy | proxy_pass + Host / X-Real-IP / X-Forwarded-For / X-Forwarded-Proto |
| Static files | root + try_files (with optional SPA fallback to index.html) |
| Redirect | return <code> <target>; |
| SSL | listen 443 ssl + ssl_certificate / ssl_certificate_key |
| HTTP→HTTPS | A port-80 server that 301-redirects to HTTPS |
Config is generated client-side — nothing is uploaded.
Frequently asked questions
Related tools
Subnet Calculator
Calculate IPv4 and IPv6 subnets from CIDR notation — network address, broadcast, usable host range, subnet mask, wildcard mask, and a visual bit map
Programmer Calculator
Multi-base calculator with simultaneous binary, octal, decimal and hex views, bitwise AND/OR/XOR/NOT/shift operations, and IEEE 754 float inspection
Database Connection String Builder
Build and URL-encode connection strings for PostgreSQL, MySQL, MongoDB, Redis and SQLite from a simple form — with JDBC and key/value variants
Docker Compose Builder
Build a valid docker-compose.yml from a visual form — services, images, ports, volumes, environment variables, restart policies and dependencies
Regex Explainer
Break down a regular expression into a plain-English, token-by-token explanation with a live match preview and a library of common patterns