🟩 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
- ・All generation runs entirely inside your browser
- ・Host names, paths and settings are never sent to a server
- ・No logs, no tracking, no database
🎛 Preset
🧩 Choose features
📄 Generated nginx.conf
📖 How to Use
-
1
Pick a presetSelect Static, WordPress, Laravel or Next.js — recommended features get auto-checked.
-
2
Set host and SSL pathsEnter server_name, document root, and Lets Encrypt fullchain.pem / privkey.pem paths.
-
3
Copy or downloadUse the buttons to copy to clipboard or download as a .conf file.
-
4
Place into nginx and reloadPlace 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.
🔗 Related Tools
🐛 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.
✅
Thanks for your report!
Your report has been delivered to the operator and will be used to improve the tool.