3
0
Fork 0
forked from mirrors/nixpkgs

nixos/nginx: add upstreams examples (#118447)

* nixos/nginx: add upstreams examples

I am not fully sure if they are fully correct but they deployed the right syntax.

* nixos/nginx: use literal example

* Update nixos/modules/services/web-servers/nginx/default.nix

* Update nixos/modules/services/web-servers/nginx/default.nix
This commit is contained in:
Sandro 2021-04-17 00:25:03 +02:00 committed by GitHub
parent 317ddc352c
commit 0139874db9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -676,6 +676,7 @@ in
Defines the address and other parameters of the upstream servers.
'';
default = {};
example = { "127.0.0.1:8000" = {}; };
};
extraConfig = mkOption {
type = types.lines;
@ -690,6 +691,14 @@ in
Defines a group of servers to use as proxy target.
'';
default = {};
example = literalExample ''
"backend_server" = {
servers = { "127.0.0.1:8000" = {}; };
extraConfig = ''''
keepalive 16;
'''';
};
'';
};
virtualHosts = mkOption {