Sites and reverse proxy

Domains, upstreams, load balancing, health checks, and per-site WAF switches.

A site is one public hostname set plus one or more origins. CheeseWAF is the reverse proxy in front of those origins.

Create and edit

Console: Sites. REST: GET/POST /api/sites, GET/PUT/DELETE /api/sites/{id}. You can also import an Nginx server block with POST /api/nginx/import.

Fields that matter

FieldConfig keyNotes
Site idsites[].idStable id, used in URLs
Namesites[].nameDisplay name
Domainssites[].domainsHost header match
Upstreamssites[].upstreams[].addresshost:port, optional weight
Listen portsites[].listen_portOptional extra listener
Load balancesites[].loadbalanceDefault round_robin
Enabledsites[].enabledOff = skip this site
WAF onsites[].waf.enabled
Modesites[].waf.modeUsually block
Paranoiasites[].waf.paranoia_level0–5
Enginessites[].waf.semantic_enginessql, xss, rce, lfi, xxe, ssrf, nosql, ssti
Custom rulessites[].waf.custom_rulesRegex on URI or other locations
Rewritesites[].waf.rewritePath rewrite or redirect
Health checksites[].waf.health_checkPath, interval, thresholds
Trusted CIDRssites[].waf.access_control.trusted_cidrsReal client IP behind another proxy

Health checks

When health_check.enabled is true, CheeseWAF probes health_check.path on each upstream. Unhealthy origins leave the pool after unhealthy_threshold failures.

Rewrites

A rewrite rule has pattern, replacement, and optional redirect_code. redirect_code: 0 rewrites internally. A 3xx code sends the client to the new path.

Per-site policy overlay

sites[].waf.protection_policy can override the global protection.policy keys:

  • web_attack
  • api_security
  • bot_cc
  • threat_intel

Empty strings inherit the global value (smart in the sample).