Nginx Reverse Proxy Config Generator
Generate a production-ready Nginx reverse proxy configuration for your backend app. Configure WebSocket support, SSL/TLS, CORS, rate limiting, cache headers, and security headers — then copy the result directly into your server.
Frequently Asked Questions
What is an Nginx reverse proxy and when do I need one?▼
A reverse proxy sits in front of your backend server (Node.js, Python, Go, etc.) and forwards client requests to it. You need one when: running multiple apps on one server (route by domain/path), adding SSL/TLS termination without modifying your app, hiding the backend port and implementation, adding rate limiting/security headers at the edge, or enabling WebSocket connections with proper upgrade headers.
How do I proxy a Node.js app on port 3000?▼
Set Upstream URL to http://127.0.0.1:3000 and Server Name to your domain. Nginx listens on port 80 (or 443 with SSL) and forwards all requests to your Node app. Add proxy_set_header X-Forwarded-For to make the real client IP available via req.headers['x-forwarded-for'] in your Node app. Also set proxy_buffering off for streaming/SSE responses.
How do I enable WebSocket support with Nginx?▼
WebSocket connections require the Upgrade header to be passed through. Check 'WebSocket Support' in this tool — it adds: proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; Without these, the WebSocket handshake fails with a 400 or 502 error. This works for socket.io, ws, and any WS-based protocol.
What is the proxy_read_timeout and when should I increase it?▼
proxy_read_timeout defines how long Nginx waits for a response from the upstream server before returning 504 Gateway Timeout. Default is 60s. Increase it for: long-running API endpoints, file uploads, AI inference, report generation, or any operation that takes more than a minute. Set it to the maximum expected response time plus a buffer. Never set it below your upstream's processing time.
How does CORS work at the Nginx level?▼
CORS (Cross-Origin Resource Sharing) headers tell browsers whether a cross-origin request is allowed. Nginx can add these headers before the response reaches the client. This is useful when your backend doesn't handle CORS itself or when you want to centralize CORS policy. The Access-Control-Allow-Origin header specifies which origins are allowed — use * for any origin or a specific domain for tighter security.
How do I add SSL/TLS to my Nginx proxy?▼
The easiest way is Let's Encrypt: install certbot, run 'sudo certbot --nginx -d yourdomain.com'. Certbot auto-configures SSL in your nginx.conf. Alternatively, enable SSL in this generator and provide your certificate paths. The config will add an HTTP→HTTPS redirect block, TLSv1.2/1.3, and modern cipher suites. After applying, run 'sudo nginx -t' then 'sudo systemctl reload nginx'.
Related Products
on GumroadPremium Workflow Pack
Production-grade workflows, architecture guides, and deployment scripts for teams that ship. 10 advanced CI/CD workflows (blue-green, canary, E2E, security), 5 architecture deep-dives, code review checklist, PR process guide, and 5 battle-tested Bash deployment scripts.
Buy on Gumroad →GitHub Actions CI/CD Templates Pack
12 production-ready GitHub Actions workflow templates covering Node.js, Python, Docker, multi-environment deployments, security scanning, and auto-changelog. Copy, paste, ship.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
nginx Config Generator
Generate production-ready nginx server blocks instantly. Supports static sites, reverse proxy (Node.js, API), PHP-FPM, and HTTPS redirects. Includes SSL/TLS, gzip, cache headers, security headers, and
Open free tool →
Haproxy Config Validator
Haproxy Config Validator — developer tool on DevPlaybook.
Open free tool →
nginx Config Builder
Build nginx server blocks and location blocks with a visual form. Configure reverse proxy, static file serving, WebSocket, CORS, gzip, and security headers. Generates copy-ready nginx config snippets.
Open free tool →
More Free Tools
Related Articles
Nginx Configuration Guide for Web Developers 2026: Reverse Proxy, SSL & Performance
Master Nginx configuration in 2026. Complete guide covering reverse proxy setup, SSL/TLS with Let's Encrypt, gzip compression, caching, rate limiting, load balancing, and common gotchas.
Nginx vs Caddy vs Traefik vs HAProxy: Web Server & Reverse Proxy Comparison 2025
A comprehensive comparison of Nginx, Caddy, Traefik, and HAProxy. Performance benchmarks, SSL/TLS handling, configuration syntax, Docker/K8s integration, and when to use each.
Nginx Config Generator: Stop Writing Server Blocks by Hand
Learn how to use an Nginx config generator to create reverse proxies, SSL configs, load balancers, and virtual hosts instantly. Includes real examples and best practices.
Complete Guide to HTTP Security Headers: CSP, HSTS, and Modern Browser Security 2026
Master HTTP security headers in 2026: Content-Security-Policy configuration, HSTS preloading, Permissions-Policy, COEP/COOP for cross-origin isolation, and real-world configs for nginx, Apache, and Next.js.
DevOps Automation Tools in 2026: Orchestrating the Software Delivery Pipeline
Master DevOps automation with this guide to the tools that orchestrate modern software delivery. Covers CI/CD pipelines, infrastructure provisioning, configuration management, testing automation, and the emerging AI-assisted automation patterns that define 2026.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →