Skip to content
⚙️

Nginx Config Generator

Generate nginx server blocks for static sites, reverse proxy, SSL/HTTPS, gzip, caching. Copy or download. Runs in your browser.

Server

SSL / HTTPS

Listens on 443 with the cert paths below.

Redirects

Adds a server block on port 80 that 301-redirects to HTTPS.

Adds a redirect from example.com to www.example.com.

Adds a redirect from www.example.com to example.com.

Performance

Compress text responses to reduce bandwidth.

Security

Adds X-Frame-Options, X-Content-Type-Options, and Referrer-Policy.

Presets

nginx config
 

About nginx server blocks

An nginx server block defines how nginx responds to requests for one or more domains. The listen, server_name, root, and location directives are the core. For HTTPS, point ssl_certificate and ssl_certificate_key at your PEM files (e.g., from Let's Encrypt). Save the generated config to /etc/nginx/sites-available/ and reload nginx.

Common uses

  • Static sites — quickly serve a static folder.
  • Reverse proxy — front a Node/Python/Ruby app.
  • HTTPS migration — switch a site to TLS.
  • Multi-domain server — host several sites on one box.

Privacy

All generation runs 100% in your browser. No data is sent to any server.