100% Client-Side Reverse Proxy Wizard
Nginx & Caddy Reverse Proxy Generator
Generate production-grade reverse proxy configurations with WebSocket support, Let's Encrypt SSL termination, HSTS security headers, rate limiting, and Caddyfile syntax.
Proxy Upstream & Security Toggles
# ==============================================================================
# Nginx Hardened Reverse Proxy Configuration
# Generated via BestUtilities.org Nginx Reverse Proxy Wizard
# Domain: api.example.com -> Upstream: http://127.0.0.1:3000
# ==============================================================================
# 1. Global Rate Limiting Zone (Drop into http {} block or above server {})
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=20r/s;
upstream backend_nodes {
server 127.0.0.1:3000;
keepalive 32;
}
# HTTP to HTTPS Redirect
server {
listen 80;
listen [::]:80;
server_name api.example.com;
return 301 https://$host$request_uri;
}
# HTTPS Primary Virtual Host
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name api.example.com;
# SSL TLS Certificates (Certbot Let's Encrypt)
ssl_certificate /etc/letsencrypt/live/api.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.example.com/privkey.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
# Modern TLS Protocols & Ciphers
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
# Security Headers
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# Client Request Limits
client_max_body_size 50M;
location / {
limit_req zone=api_limit burst=10 nodelay;
proxy_pass http://backend_nodes;
proxy_http_version 1.1;
# Standard Proxy Forwarding Headers
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;
# WebSocket Connection Upgrades
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}