Reference

nginx feature

What it does

nginx, serving static HTTP sites, HTTPS proxies and static roots, TLS TCP streams and ACME HTTP-01 challenges.

Use it

Import it from (vessel system features nginx). This part of a system configuration uses it:

Example: feature-nginx-example

(import (vessel system)
        (vessel system features nginx))

;; A static site over plain HTTP, from files under /etc.
(system-configuration
  etc-files: '(("web-server/index.html" . "<h1>Hello from Vessel!</h1>\n"))
  features:
    (cons (nginx-feature redirect-http: #f
                                 http-root: "/etc/web-server")
          %server-features))

Verified

A real system.sgl also sets the fields this example leaves out: the host name, kernel, boot loader and file systems. Every time the manual is built, it composes this configuration with Vessel's code and checks what the feature receives.

Options

Pass these keyword fields directly to the feature type. The optional name: keyword sets the instance name; a copy keeps it unless changed.

Option

Default

Type

Description

listen

'()

not available

not available

redirect-http

#t

not available

not available

http-root

#f

not available

not available

uid

60

not available

not available

gid

60

not available

not available

What it adds

Its declared extensions target these feature types:

What it receives

  • vhost: An HTTPS virtual host; each server name is a claim.

  • stream-server: A TLS TCP listener forwarding to a loopback upstream.

  • challenge: Names whose ACME HTTP-01 challenges are answered on port 80.

  • certificate-files: Where one certificate's chain and key are, by certificate name.

Used in

Created with Sigil