recipe_debian_nginx.ts

Debian/Ubuntu nginx site recipes — the nginx_site_core body wired to the Debian layout (sites-available + sites-enabled symlink, snippets/ for the SSL include, conf.d/ for the rate-limit zone).

The neutral core (the server block) lives in recipe_nginx.ts; these wrappers only supply the distro-specific paths, so the load-bearing config isn't duplicated. The Alpine sibling is recipe_alpine_nginx.ts.

Recipes are pure functions evaluated in zap's sandboxed config eval (fgro eval: no I/O, clock, or randomness); the output is deterministic.

view source

Declarations
#

2 declarations

debian_nginx_catch_all
#

recipe_debian_nginx.ts view source

(options?: NginxCatchAllOptions | undefined): NginxCatchAll import {debian_nginx_catch_all} from '@fuzdev/zap/recipe_debian_nginx.js';

Build the Debian catch-all: the removal of the stock sites-enabled/default symlink, and the catch-all default_server file at /etc/nginx/conf.d/00-catch-all.conf (conf.d/, which Debian's nginx.conf includes in its http block). See nginx_catch_all_core: order the file after the removal and after the SSL parameters, and give http2 and ssl as the site recipe has them.

options?

optional

returns

NginxCatchAll

the removal script payload and the catch-all file payload.

debian_nginx_spa_site
#

recipe_debian_nginx.ts view source

(options: NginxSpaSiteOptions): NginxSiteContent import {debian_nginx_spa_site} from '@fuzdev/zap/recipe_debian_nginx.js';

Build the full Debian nginx site config for a single-page app.

Delegates to nginx_site_core with the SSL-snippet path SSL_PARAMS_PATH. The caller gives the result as the content of a file at /etc/nginx/sites-available/<domain> and symlinks it into sites-enabled.

options

returns

NginxSiteContent

the site's template content, domain and port its vars, plus any redirect_domain_<i> (see nginx_site_core).

Depends on
#