NGINX Config Builder
Generate a correct NGINX server block — reverse proxy, static hosting, SSL and redirects — without hand-writing directives.
Examples
Build an HTTP reverse proxy
Server name: api.example.com
Listen port: 8080
SSL: off
Client max body size: 2M
Location: / (reverse proxy)
Upstream: http://127.0.0.1:3000server {
listen 8080;
listen [::]:8080;
server_name api.example.com;
client_max_body_size 2M;
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;
}
}
A proxy location includes the upstream plus Host, client-IP, forwarded-chain, and original-scheme headers.
Serve an HTTPS single-page application
Server name: app.example.com
SSL: on
Redirect HTTP to HTTPS: on
Certificate: /etc/letsencrypt/live/app.example.com/fullchain.pem
Key: /etc/letsencrypt/live/app.example.com/privkey.pem
Location: / (static files)
Root: /srv/app
SPA fallback: onserver {
listen 80;
server_name app.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name app.example.com;
ssl_certificate /etc/letsencrypt/live/app.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;
location / {
root /srv/app;
try_files $uri $uri/ /index.html;
}
}
Enabling both SSL and HTTP redirect emits two server blocks, while SPA fallback sends unmatched static paths to index.html.
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 this tool
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.
Use cases
Reverse-proxying an application server
Generate the common proxy_pass and forwarded-header boilerplate for a Node.js, Python, or other local upstream.
Hosting a static SPA
Create a document-root location with index.html fallback so client-side routes survive a browser refresh.
Bootstrapping TLS server blocks
Add certificate paths, IPv4 and IPv6 port 443 listeners, and an optional companion HTTP-to-HTTPS redirect.
Combining path behaviors
Assemble multiple proxy, static, and redirect locations in one generated server block.
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.
Common mistakes
Mistake:Deploying the generated text without testing the complete NGINX configuration.
Fix:Place it in the intended context and run nginx -t before reloading. The builder renders form values but does not invoke NGINX or validate the surrounding configuration.
Mistake:Enabling SSL and assuming the named certificate and private-key files already exist and match.
Fix:Provision the certificate separately, verify both paths and permissions on the server, and confirm the certificate covers the configured server name.
Mistake:Pasting untrusted text into directive fields and treating the output as sanitized.
Fix:Review every domain, path, upstream, redirect, size, and status value. The builder trims and interpolates strings; it does not escape arbitrary NGINX syntax.
Mistake:Ignoring URI-joining behavior when changing proxy_pass or location paths.
Fix:Check the upstream URI and trailing slashes against the routing behavior you need, then test representative requests before deployment.
Frequently asked questions
What configurations can it generate?
It builds server blocks with reverse-proxy, static-file or redirect locations, with optional SSL, HTTP-to-HTTPS redirect, gzip and request-body limits.
Does a reverse proxy include forwarded headers?
Yes. The generated proxy location includes Host and X-Forwarded-* headers so upstream applications receive the expected host, protocol and client information.
How do I configure an SPA fallback?
Choose static hosting and enable the SPA fallback; the output adds try_files so client-side routes resolve to index.html instead of returning a refresh-time 404.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML