Nginx Config Generator
Choose what the server should do and get a ready-to-use conf.d file with TLS settings, HTTP→HTTPS redirect, gzip, security headers, WebSocket proxying and rate limiting. Always test with nginx -t before reloading.
About the Nginx Config Generator
The Nginx Config Generator writes a conf.d server block for a reverse proxy, a load balancer (round robin, least connections or IP hash), a static site, a single-page app or PHP-FPM. Options include TLS settings, an HTTP to HTTPS redirect with a certbot challenge path, HSTS, gzip, security headers, WebSocket proxying, static asset caching and rate limiting. All values are validated before they reach the file.
How to use the Nginx Config Generator
- Choose the site type and enter the server name and backend or document root.
- Turn on the options you need, such as SSL, gzip or WebSocket support.
- Click Generate, save the file to /etc/nginx/conf.d and run nginx -t before reloading.
Frequently asked questions
How do I test the generated config?
Run sudo nginx -t, then sudo systemctl reload nginx. The generator cannot know your certificates or upstreams, so confirm the paths and backends exist.
Which nginx version does it need?
The TLS block uses the separate http2 on directive from nginx 1.25.1; on older versions replace it with listen 443 ssl http2. No Content-Security-Policy is added because it has to match your application.
Are my data stored when I use the Nginx Config Generator?
The text you submit is processed in memory to produce the result and is not saved. Like any web server, Code Converter logs basic visit data (page, IP address and browser) but never the content you paste.
Is the Nginx Config Generator free, and can I call it from a script?
It is free and needs no account or signup. The same tool is available as a REST endpoint at POST /api/nginx-generator; see the API documentation for the fields and examples.