Docs

Browse releases →

nginx

nginx — high-performance HTTP and reverse proxy server

nginx

nginx — high-performance HTTP and reverse proxy server

1.31.5 · aarch64-darwin

Package composition

Authenticated meta-packages may contribute only named nginx.virtualHosts and nginx.upstreams entries. They cannot enable nginx or replace global policy.

TLS credentials

Certificate and private-key values are opaque references resolved into optional volatile systemd credentials. Secret bytes never enter Nix evaluation, the store, or generated configuration.

Quick start

Install nginx, set nginx.enable, and declare at least one virtual host. AOS validates each candidate with nginx -t before activation and reloads a running master in place.

{
  aos.apm.desiredPackages = ["nginx"];
  nginx.enable = true;
  nginx.virtualHosts.default.listen = [8080];
}
OptionTypeDescription
accessLogbooleanWrite the HTTP access log to nginx's managed log directory.
clientMaxBodySizestring matching [0-9]+[kKmMgG]?Maximum accepted HTTP request body size.
configattribute set of attribute set of any valueDesired values for the package's declared config artifacts.
credentialsattribute set of submoduleOpaque references for the package's declared credentials.
enablebooleanEnable the nginx HTTP and reverse proxy service.
extraHttpConfigstrings concatenated with newlinesTrusted nginx directives appended to the global HTTP block.
gzipbooleanEnable gzip response compression.
tlsCredentials2 children
upstreamsattribute set of submoduleNamed reverse-proxy upstream pools.
virtualHostsattribute set of submoduleNamed HTTP virtual hosts.
workerConnectionssigned integerMaximum simultaneous connections handled by each worker.
workerProcessessigned integer or one of ["auto"]Number of nginx worker processes, or `auto`.