Azlaan Electric AC Solar Center — Solar, CCTV, AC & electrical work, Faisalabad Call: 0300-8987448

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

  1. Enter the domain and choose the site type.
  2. For a reverse proxy, enter the backend address; for static/PHP, enter the document root.
  3. Select the SSL, www redirect, and gzip options.
  4. Press Generate Config — the config will appear below, ready to use.
  5. 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.