Generate Nginx Configs
In Seconds
Stop Googling nginx syntax. Pick your use-case, fill in the fields, and get a ready-to-paste nginx server block — with SSL, reverse proxy, load balancing, and more.
Reverse Proxy
Route traffic to any backend — Node, Docker, FastAPI, or any HTTP service — with a single click.
SSL / TLS Ready
Generates the correct ssl_certificate, ssl_protocols, and HSTS headers for modern HTTPS.
Load Balancer
Round-robin, least-connections, or IP-hash upstream blocks for multiple backend servers.
Configuration Options
Enable SSL / HTTPS
Uses Let's Encrypt paths by default
Forward proxy headers
X-Real-IP, X-Forwarded-For, etc.
WebSocket support
Adds Upgrade + Connection headers
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
# Gzip Compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml;
# Logs
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
client_max_body_size 10m;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Connection "";
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_connect_timeout 60s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
}
}How to apply: Save this to /etc/nginx/sites-available/example.com, then symlink it, verify with nginx -t, and reload with systemctl reload nginx.
Frequently Asked Questions
Everything you need to know about Nginx Config Generator.