Nginx Config Generator (Reverse Proxy, SPA, HTTPS)
For developers and admins putting an app behind Nginx. Pick the site type and options to get server blocks you can paste into sites-available.
Close the gaps with real-world projects
Build industry projects on ByteLabs and add verified proof of your skills to your public profile.
How to use the Nginx Config Generator
- Enter the domain and pick the site type.
- Set the app address for a proxy, or the web root for static, SPA or PHP.
- Tick HTTPS, www redirect, gzip, security headers and the rest.
- Copy the config, test it with sudo nginx -t and reload Nginx.
An example, step by step (example only)
You enter
example.com as a reverse proxy to http://127.0.0.1:3000 with HTTPS, www redirect, gzip, security headers and static caching
The tool shows
3 server blocks: port 80 redirecting to HTTPS (keeping the Lets Encrypt challenge path), www.example.com redirecting to example.com, and the HTTPS site with TLS 1.2 and 1.3, security headers, gzip and proxy_pass to the app
Questions about the Nginx Config Generator
How do I redirect HTTP to HTTPS in Nginx?
Add a server block on port 80 that returns 301 to https://your-domain$request_uri, as the generated config does, and keep the /.well-known/acme-challenge/ path open for certificate renewals.
How do I serve a React or Vue app with Nginx?
Use try_files $uri $uri/ /index.html so every route falls back to index.html. Pick Single-page app in the generator.
Where do I get the SSL certificate?
Run certbot for your domain first; it creates the files under /etc/letsencrypt/live/your-domain/ that the config points to.
Is the Nginx Config Generator free and private?
Yes. It is free, needs no sign-up and runs entirely in your browser, so what you type is not uploaded. You only sign in if you want to email a result to yourself or save it to your CareerByteCode profile.