Skip to content

🟩 nginx.conf Generator

Enter your host, root directory and SSL paths, then toggle features. Generates a production-ready server block: HTTPS redirect, HTTP/2, modern TLS, HSTS, gzip / brotli, static cache, PHP-FPM, reverse proxy, WebSocket and try_files in real time.

✅ 100% free · no signup · browser-only · nothing is uploaded

🔒 About Privacy

🎛 Preset

🧩 Choose features

📄 Generated nginx.conf


        
    

📖 How to Use

  1. 1
    Pick a preset
    Select Static, WordPress, Laravel or Next.js — recommended features get auto-checked.
  2. 2
    Set host and SSL paths
    Enter server_name, document root, and Lets Encrypt fullchain.pem / privkey.pem paths.
  3. 3
    Copy or download
    Use the buttons to copy to clipboard or download as a .conf file.
  4. 4
    Place into nginx and reload
    Place into /etc/nginx/sites-available/, symlink into sites-enabled, run sudo nginx -t to test, then sudo systemctl reload nginx.

❓ FAQ

What if I do not have an SSL certificate yet?
Use certbot from Lets Encrypt to issue a free certificate: sudo certbot --nginx -d example.com -d www.example.com. Only enable HSTS after HTTPS is fully working.
nginx -t reports an error
Most issues are SSL path typos or a PHP-FPM socket path that does not match your install. Check the line number in the error and run journalctl -u nginx.
Can I use Apache .htaccess on nginx?
No. nginx does not read .htaccess — rewrites must live in server / location blocks. For Apache hosts, use our .htaccess generator instead.
🐛 Found a bug or issue with this tool?

Free to use, no signup. Even just the steps to reproduce are helpful. Reports go directly to the operator and help us fix issues.

* Browser info (UA / screen / language / URL) is sent automatically to help reproduce the issue