DevOps Generators

Nginx Config Generator

All tools

A minimal nginx reverse proxy block for one domain and one local app.

How it works

Four simple steps

1

Enter the domain

Type the server_name, such as example.com.

2

Build the block

Press Run to write the reverse proxy config.

3

Adjust the upstream

Change 127.0.0.1:3000 if your app uses another port.

4

Test and reload

Run nginx -t, then reload nginx to apply it.

Nginx Config Generator

About Nginx Config Generator

A Node or Python app is running on port 3000 on a fresh VPS, and you want it reachable at your domain on port 80. A small nginx server block in front of it does the job, and you can add TLS once DNS points at the box.

Enter the server name (one domain, or several separated by spaces) and press Run. The generator writes a single server block that listens on port 80, matches that server_name, and proxies every path to http://127.0.0.1:3000. It sets the Host header to the requested host and X-Real-IP to the client address, so your app sees the original domain and visitor IP.

The upstream address and port are fixed, so edit proxy_pass if your app listens elsewhere. The block also leaves out HTTPS, the X-Forwarded-For and X-Forwarded-Proto headers, and WebSocket upgrade headers. If your framework builds absolute URLs or checks the scheme, add X-Forwarded-Proto once TLS is in place. Run nginx -t before every reload so a typo does not take the site down.

The config is generated in the browser. Add response hardening with the security headers starter pack and cross-origin rules with the CORS header generator. On Apache hosting, the .htaccess rules generator handles HTTPS and single-page app rewrites.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Debian and Ubuntu packages read /etc/nginx/sites-available/ through symlinks in sites-enabled. Other installs often include /etc/nginx/conf.d/*.conf. Check the include lines in nginx.conf to be sure.

This block only listens on port 80. A common route is Certbot with its nginx plugin, which adds a listen 443 ssl block and certificate paths to the config. You can also add them by hand with your own certificates.

The app sees the TCP connection, which comes from nginx. Read the X-Real-IP header instead, or configure your framework to trust the proxy and use forwarded headers.

View more FAQs

Related tools

View all

Kubernetes Manifest Studio

Generate Deployment, Service, and Ingress YAML with a drift checklist.

Open

K8s Inspector

Summarize Kubernetes YAML kinds, names, and labels.

Open

K8s Resource Diff

Diff two Kubernetes manifests locally.

Open

K8s Manifest Splitter

Split multi-document YAML into one file per resource.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools