Nginx config generator
Pick what you're serving — a static site, an SPA, or a Node.js app behind a reverse proxy — set your domain and options, and get a complete nginx config with an explanation of every directive.
What are you serving?
Options
Generated config
Save it as /etc/nginx/sites-available/yourdomain, symlink it into sites-enabled, then test and reload with:. The -t flag validates the config before the reload, so a typo never takes the server down.
What each directive does
About this tool
nginx is the web server you'll most often meet on a Linux VPS: it serves static files fast, terminates TLS, and works as a reverse proxy in front of Node.js apps. Most real-world configs are variations of a handful of patterns — this tool generates the four most common ones.
The HTTPS blocks assume you use certbot with Let's Encrypt: the certificate paths in the generated config (/etc/letsencrypt/live/...) are exactly where certbot puts them. Run certbot first, then drop this config in.
Everything runs in your browser — the config is generated locally and nothing you type leaves the page.
Read more
- Nginx reverse proxy for multiple Node.js apps — the full setup on a real VPS
- How to configure Nginx for HTTPS — certbot and Let's Encrypt step by step
- How to create your first VPS on DigitalOcean
- How to use pm2 to serve a Node.js app — keep the app behind the proxy running