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.

Frequently Asked Questions (FAQ)

What can I generate with this tool?

A ready-to-use nginx server block for a reverse proxy, a static website, or a PHP site with PHP-FPM — with options for SSL, www redirect and gzip.

What options does the generator support?

Domain, site type, backend address for reverse proxies, document root for static and PHP sites, PHP-FPM socket, client_max_body_size, and toggles for SSL, www redirect and gzip compression.

Does it install an SSL certificate for me?

No. The generator builds the server block only — you install the certificate yourself, for example with certbot --nginx -d example.com. Save the file in /etc/nginx/sites-available/, test it with nginx -t, then reload.

What should I do before applying the config?

Always run nginx -t to test the config before reloading the server, and keep a backup of your working config before swapping in the generated one.