Nginx Config Generator
Generate nginx configurations for reverse proxy, SSL, static sites, and load balancers with security headers
Nginx Config Generator
Template
Basic Settings
Security Headers
Generated Config
server { listen 80; listen [::]:80; server_name example.com; root /var/www/html; index index.html; # Response headers add_header X-Frame-Options "DENY" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; # Gzip compression gzip on; gzip_vary on; gzip_min_length 1024; gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml; location / { try_files $uri $uri/ =404; } }
Last updated:
This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/nginx-config-generator/
For automation planning, fetch the canonical contract at /api/tool/nginx-config-generator.json.
How to Use Nginx Config Generator
- 1
Select server type
Choose your use case: static site, reverse proxy, load balancer, SPA with history fallback, or API gateway.
- 2
Configure upstream servers
Add backend servers as IP:port rows. The generator writes them into an upstream block, which nginx balances round-robin by default; there is no control here for other balancing methods.
- 3
Enable SSL/TLS
Paste your certificate and key paths. The generator creates full SSL configuration with strong ciphers, HSTS headers, and redirect from HTTP.
- 4
Toggle caching, gzip and rate limiting
The location blocks come from the template you picked; the toggles add asset caching, gzip and a request-rate limit on top. There is no free-form location editor.
- 5
Copy config and deploy
Copy or download the whole config as one nginx.conf; there is no per-block export. Drop it in /etc/nginx/sites-enabled/ and run 'nginx -t' to validate before reload.