Nginx Config Generator
Generate a ready-to-paste nginx server block — static site or reverse proxy — with HTTPS, gzip, caching, and security headers. Runs entirely in your browser.
Site
How it works
- Fill in your domain, pick a mode — Static root or Reverse proxy — and toggle the features you want.
- HTTPS switches the main block to
listen 443 sslwith your certificate paths and a hardened TLS snippet, plus an optional port-80 redirect block. - gzip, cache headers for static assets, and the security header trio are emitted as ready-to-use directives.
- Paste the output into
/etc/nginx/sites-available/, symlink it intosites-enabled, then runnginx -tbefore reloading.
About Nginx Config Generator
Writing nginx server blocks by hand is repetitive: listen directives, server_name, SSL paths, and the handful of proxy and security headers everyone expects. This generator assembles a complete, valid block from a small form so you start from working boilerplate instead of a stale blog snippet.
The output targets current nginx conventions — listen 443 ssl with TLSv1.2/1.3 only, no legacy cipher preferences, gzip and cache-control tuned for typical static sites, and the common security header trio. Treat it as a solid starting point: add rate limiting, access rules, or upstream health checks for production, and always validate with nginx -t after pasting.