Nginx Config Generator

// Generate nginx server block configuration

gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
gzip_min_length 256;

server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;
    }
}

#About Nginx Config Generator

Free online Nginx configuration generator. Create nginx server blocks for reverse proxy, static file serving, and SSL termination with gzip compression. This tool runs entirely in your browser — your data is never sent to a server. Just paste your input, get instant results, and copy with one click. No sign-up or installation required.

#FAQ

What is an Nginx server block?
A server block (also called a virtual host) is a configuration block in Nginx that defines how to handle requests for a specific domain or IP. It specifies the listen port, server name, root directory, and proxy settings.
How do I set up Nginx as a reverse proxy?
Use the proxy_pass directive to forward requests to a backend server. This generator lets you specify the upstream URL, and it generates the proper proxy headers (X-Real-IP, X-Forwarded-For, X-Forwarded-Proto) automatically.
</> Embed this tool

Copy this code to embed the tool on your website. Adjust the height to fit your layout.

<iframe src="https://www.browserutils.dev/embed/nginx-config-generator" width="100%" height="500" frameborder="0" title="Nginx Config Generator"></iframe>

#Related