Nginx Config Generator
Free online Nginx config file generator tool
About NGINX Config Generator
Produces an NGINX server block from four inputs (domain, document root, index file, optional proxy_pass) plus an SSL toggle. When SSL is on it emits a 443 server block with Let's Encrypt certificate paths and a separate port-80 server that 301-redirects to HTTPS; when off it emits a single port-80 server block.
How to Use
1. Set Domain (used for server_name and the access/error log file names). 2. Set Document Root (e.g. /var/www/html) and Index File (e.g. index.html). 3. Optionally fill Proxy Pass (e.g. http://localhost:3000) to switch the location block from static file serving to reverse proxy. 4. Toggle the SSL button ON or OFF. 5. Click Generate Config, then Copy.
Location Block Branching
If Proxy Pass is filled, the `/` location emits proxy_pass plus the standard Host, X-Real-IP, X-Forwarded-For, and X-Forwarded-Proto headers; the root and index directives are skipped. If Proxy Pass is empty, the location uses `try_files $uri $uri/ =404` against the configured root/index. SSL mode adds listen 443 ssl http2 with TLSv1.2/1.3 and HIGH:!aNULL:!MD5 ciphers, certificate paths under /etc/letsencrypt/live/<domain>/, and an HTTP-to-HTTPS redirect server block.
▶Where does the tool expect my TLS certificates?
▶What happens to access and error logs?
▶Can I serve both static files and a proxy?
▶Is my data sent to a server?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee