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:
parent
317ddc352c
commit
0139874db9
|
@ -676,6 +676,7 @@ in
|
||||||
Defines the address and other parameters of the upstream servers.
|
Defines the address and other parameters of the upstream servers.
|
||||||
'';
|
'';
|
||||||
default = {};
|
default = {};
|
||||||
|
example = { "127.0.0.1:8000" = {}; };
|
||||||
};
|
};
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
|
@ -690,6 +691,14 @@ in
|
||||||
Defines a group of servers to use as proxy target.
|
Defines a group of servers to use as proxy target.
|
||||||
'';
|
'';
|
||||||
default = {};
|
default = {};
|
||||||
|
example = literalExample ''
|
||||||
|
"backend_server" = {
|
||||||
|
servers = { "127.0.0.1:8000" = {}; };
|
||||||
|
extraConfig = ''''
|
||||||
|
keepalive 16;
|
||||||
|
'''';
|
||||||
|
};
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts = mkOption {
|
virtualHosts = mkOption {
|
||||||
|
|
Loading…
Reference in a new issue