Nginx Config Generator
Generate production-ready Nginx server block configurations visually. Supports static sites, reverse proxy, PHP-FPM, Node.js, and Django with SSL, Gzip, and security headers.
Configuration
Generated Config
Nginx Config Generator — Server Block Builder
Nginx is a high-performance web server, reverse proxy, and load balancer. Properly configured Nginx server blocks are crucial for serving web applications securely and efficiently.
Server Types
- Static Site: Serves HTML/CSS/JS files directly from disk. Fastest option for static content.
- Reverse Proxy: Forwards requests to a backend application (e.g., Express, Koa).
- PHP-FPM: Connects to a PHP FastCGI Process Manager socket for PHP apps like WordPress.
- Node.js App: Proxies to a local Node.js process with WebSocket upgrade support.
- Django/Gunicorn: Proxies to a Gunicorn WSGI server with static/media file serving.
SSL Configuration
This generator creates Let's Encrypt-compatible SSL configuration. You'll need to run Certbot first: certbot --nginx -d example.com to obtain the certificates before using this configuration.
Security Headers
Security headers like HSTS, X-Frame-Options, and Content-Security-Policy protect your users from common web vulnerabilities including clickjacking, MIME sniffing, and cross-site scripting (XSS) attacks.