Nginx Config Generator

Visually generate Nginx configuration files for reverse proxy, static sites, HTTPS and more.

Basic Configuration

Reverse Proxy

HTTPS / SSL

Gzip Compression

Custom Location

Generated Output

Usage Guide

Common Configuration Scenarios

Static sites directly host HTML/CSS/JS files with configured root and index; reverse proxy forwards requests to backend services (Node.js, Python, etc.); HTTPS configures SSL certificates for encrypted communication; Gzip compresses response bodies to reduce transfer size; custom Location rules handle specific paths for proxying or static file serving.

Steps

Select a preset template (Static Site / Reverse Proxy / HTTPS / Full Featured) in "Basic Configuration"; modify listen port, domain name, root directory and other parameters as needed; enable Reverse Proxy, HTTPS and Gzip via the "Enable" checkboxes at the top of each module; add multiple path rules in "Custom Location"; generated config updates in real-time in the text box below and can be copied or downloaded with one click.

Configuration File Locations

Ubuntu/Debian defaults to /etc/nginx/sites-available/; CentOS/RHEL defaults to /etc/nginx/conf.d/; Docker containers typically use /etc/nginx/nginx.conf. After editing, run nginx -t to check syntax and nginx -s reload to reload.

Notes

SSL certificate paths must be actual server paths; enabling HTTPS redirect generates two server blocks; WebSocket proxy requires proxy_http_version 1.1 and Upgrade headers; configurations generated by this tool are for reference only; please adjust for production environments based on actual needs.