Server & config generators

Nginx Config Generator

Generate an Nginx server block for a static site or reverse proxy, with HTTPS redirect, gzip, WebSocket-ready proxy headers and SPA fallback. Free.

Generate Nginx config

Configure your server block. We build the Nginx config.

nginx config
server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    server_name example.com www.example.com;
    gzip on;
    gzip_types text/css application/javascript application/json image/svg+xml;

    root /var/www/example.com;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }
}
Save to /etc/nginx/sites-available/, symlink to sites-enabled, then run `nginx -t` to test before `systemctl reload nginx`. Adjust certificate paths to your setup.

What this Nginx config generator does

Builds a complete server block
Static site or reverse proxy modes
HTTPS with HTTP→HTTPS redirect
WebSocket-ready proxy headers
Optional gzip and SPA fallback
Runs entirely in your browser

Common use cases

  1. 1Deploying a static site
  2. 2Proxying a Node/Next app
  3. 3Adding HTTPS with Let's Encrypt
  4. 4Setting up a new server block
  5. 5Standardising server configs
  6. 6Learning Nginx syntax

Related tools

About Nginx configuration

Nginx serves sites and proxies apps using server blocks that define the domain, how requests are handled, and TLS. A typical setup redirects HTTP to HTTPS and either serves static files with a try_files fallback or proxies to an application upstream.

This generator produces a clean server block for either case, including the proxy headers needed for WebSockets and correct client IPs. After saving it, always run nginx -t to validate the syntax before reloading, and point the certificate paths at your actual certificates.

More Free Tools Where This Came From

This utility is one of dozens of free, no-login tools for DNS, email, SEO and developers — all instant and private.

HostCloud.in  ·  Pune, India  ·  Serving 34,987+ Websites Since 2020

FREQUENTLY ASKED QUESTIONS

Got Questions? We Have Answers.

What does it generate?

A complete server block for a static site (with try_files) or a reverse proxy (with the headers needed for WebSockets and correct client IPs), including an HTTP→HTTPS redirect.

How do I install it?

Save it to /etc/nginx/sites-available/, symlink to sites-enabled, run nginx -t to test, then reload Nginx.

Does it set up SSL?

It references Let's Encrypt certificate paths for the domain — adjust them to match your actual certificates.

Does it use AI or a server?

No. It builds the config in your browser.