Nginx Config Builder

Build a reusable site config or a complete nginx.conf. Settings are grouped by context so upstreams, cache zones, rate limits, and server directives are emitted where Nginx expects them.

Start from a practical preset:

Output format

Virtual host

Primary application

Load-balanced upstream

Servers

Enable the upstream group to configure load balancing and passive health checks.

Open-source Nginx uses passive health checks through max_fails and fail_timeout. Active upstream checks require Nginx Plus or a third-party module.

Additional locations

The primary location / comes from General. Add API, admin, static, redirect, or exact-response locations here.

Redirects

Routing behavior

TLS

Headers & privacy

more_clear_headers requires the headers-more module; the generator cannot install it for you.

Compression & browser cache

Proxy behavior

Proxy cache

Rate limiting

Brotli output assumes the optional ngx_brotli module is installed and loaded.

Process & events (full nginx.conf)

These process and events settings appear only in Full nginx.conf. Switch the output format on General to include them.

HTTP core (full nginx.conf)

HTTP core settings are intentionally omitted from a site config because the parent http {} block usually defines them already. Switch to Full nginx.conf to include them.

Logs

DNS & custom directives

Custom directives are intentionally passed through. Review their context and run nginx -t before reload.

About this tool

The builder separates HTTP-level objects—upstreams, WebSocket maps, cache zones, and rate-limit zones—from server and location directives. That makes advanced combinations much safer than assembling independent snippets.

Generated output is a production-oriented starting point, not a substitute for application-specific review. Module availability, filesystem permissions, TLS certificate paths, cache bypass rules, and your installed Nginx version still matter. Always run nginx -t before reload.