Nginx Reverse Proxy Wizard
Generate a validated Nginx reverse proxy, TLS and WebSocket configuration, with proxy_pass path rewriting explained.
Configuration
validUpstreams
Location rules
Generated nginx.conf
45 lines · 1,218 chars# Generated by Nginx Reverse Proxy Wizard
# Review TLS paths and upstream addresses before deploying.
upstream app {
server 127.0.0.1:3000 weight=1;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name example.com;
ssl_certificate /etc/nginx/ssl/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
gzip on;
gzip_vary on;
gzip_types text/plain text/css application/json application/javascript application/xml image/svg+xml;
client_max_body_size 10m;
location / {
proxy_pass http://app;
proxy_http_version 1.1;
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;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_connect_timeout 10s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
}
}About
Configure domains, weighted upstream servers, exact or prefix locations, WebSocket headers, HTTPS redirects, TLS paths, gzip, body limits, and proxy timeouts entirely in your browser.
Examples
Weighted upstream with TLS redirect
generateNginxConfig({ domain: "app.example.com", ssl: true, upstreams: [{ name: "api", servers: [{ address: "127.0.0.1:3000", weight: 2 }, { address: "127.0.0.1:3001", weight: 1 }] }], locations: [] })upstream api { server 127.0.0.1:3000 weight=2; server 127.0.0.1:3001 weight=1; } + return 301 https://$host$request_uri;Two weighted backends share load 2:1 while port 80 redirects everything to the 443 ssl http2 server.
Websocket location
generateNginxConfig({ domain: "app.example.com", upstreams: [], locations: [{ path: "/socket", match: "prefix", proxyPass: "http://api", websocket: true }] })map $http_upgrade $connection_upgrade { ... } + proxy_set_header Connection $connection_upgrade;Enabling websocket adds the connection-upgrade map and the Upgrade/Connection headers to that location block.
About this tool
Nginx Reverse Proxy Wizard emits a review-ready nginx config with generateNginxConfig(config): each upstream renders an upstream block with optional weight= suffixes per server, websocket locations add the map $http_upgrade $connection_upgrade block plus Upgrade/Connection proxy headers, and ssl: true adds a port-80 redirect server (return 301 https://$host$request_uri) in front of the 443 ssl http2 server with ssl_certificate paths.
Inputs sanitize defensively rather than throwing: blank domains fall back to example.com, blank server addresses to 127.0.0.1:3000, non-positive weights are dropped, and unsafe upstream-name characters collapse to underscores. Optional extras — gzip, client_max_body_size, and proxy_connect/read/send timeouts — are emitted only when set, so identical configs always produce byte-identical output.
Validation is minimal and explicit: validateNginxConfig returns Domain is required. for a blank domain and Add at least one location rule. when no locations exist. Everything runs client-side, so domains, upstream addresses, and certificate paths never leave the browser.
How to use this tool
Set the domain and TLS
Enter the server_name domain and toggle ssl, then confirm the certificate and key paths — TLS on adds the HTTP-to-HTTPS redirect server automatically.
Define upstreams with weights
Add upstream servers as host:port with optional weights (e.g. weight 3 vs 1) to split traffic proportionally across backends.
Add locations and websocket flags
Map each path to a proxy_pass target with prefix or exact matching, and enable websocket on socket paths to get the upgrade map plus headers.
Copy and review before deploying
Paste the deterministic output into nginx.conf, verify TLS paths and upstream addresses, and test with nginx -t before reloading.
Use cases
Fronting Node APIs with TLS
Terminate HTTPS in nginx and weighted-proxy to local app servers with a single generated server block.
Adding websocket endpoints
Proxy chat or realtime paths with the correct upgrade map instead of hand-writing map and header directives.
Scaffolding multi-upstream configs
Draft canary or blue/green weight splits (3 vs 1) and tune the numbers after observing traffic.
Common mistakes
Mistake:Expecting an error for a blank domain.
Fix:The generator falls back to example.com and only validateNginxConfig reports Domain is required. — check the validation messages, not the output, for missing input.
Mistake:Assuming the websocket map appears for plain locations.
Fix:The map block is emitted only when at least one location sets websocket: true — enable it on the socket path explicitly.
Mistake:Copying cert paths without checking them.
Fix:Blank certificate paths fall back to /etc/nginx/ssl/ placeholders — replace them with the real fullchain/privkey paths before deploying.
Frequently asked questions
What does this tool do?
It generates an nginx reverse-proxy config with generateNginxConfig: weighted upstream blocks, prefix/exact locations with proxy headers, an optional websocket upgrade map, gzip/timeout extras, and an HTTP-to-HTTPS redirect server when ssl is on — plus validateNginxConfig checks for a blank domain and missing locations.
When does the websocket map appear, and what does TLS add?
The map $http_upgrade $connection_upgrade block (plus Upgrade/Connection headers) appears only when a location sets websocket: true. Enabling ssl adds a port-80 server with return 301 https://$host$request_uri in front of the 443 ssl http2 server.
Is my config uploaded or stored?
No. Generation and validation are pure client-side string building — domains, upstream addresses, and certificate paths never leave your browser.
Why did a blank domain or zero weight not error?
Blanks degrade to fallbacks (example.com, 127.0.0.1:3000) and non-positive weights are dropped silently; only validateNginxConfig reports Domain is required. Check its messages before deploying.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.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.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.