DevTools Logo

Nginx Reverse Proxy Wizard

Nginx Reverse Proxy Wizard

Generate production-ready Nginx reverse proxy and WebSocket configuration in your browser

Server settings

Upstreams

Location rules

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

Input
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: [] })
Output
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

Input
generateNginxConfig({ domain: "app.example.com", upstreams: [], locations: [{ path: "/socket", match: "prefix", proxyPass: "http://api", websocket: true }] })
Output
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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

References & standards

.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