Nginx Config Generator
Deploying a website on nginx? Enter your domain, choose reverse proxy, static site or PHP, toggle SSL, www redirect and gzip — and get a ready-to-paste server block. Copy it to your server, test with nginx -t, and reload. No config-file guesswork.
Used only for a PHP site.
Generated nginx config
Save the file in
/etc/nginx/sites-available/<domain>, test it with nginx -t, then run nginx -s reload. For SSL with Let's Encrypt: certbot --nginx -d example.com.How to use
- Enter the domain and choose the site type.
- For a reverse proxy, enter the backend address; for static/PHP, enter the document root.
- Select the SSL, www redirect, and gzip options.
- Press Generate Config — the config will appear below, ready to use.
- Copy or download it and use it on your server.
Tips
- Always run nginx -t to test the config before reloading the server.
- Keep a backup of your working config before swapping in a generated one.
- SSL needs a real certificate — the generator builds the block; install the cert (e.g. Let's Encrypt) yourself.
- Review client_max_body_size and gzip settings for your actual traffic before going live.