Skip to content

Commit de4b124

Browse files
authoredApr 4, 2021
nixos/nginx: add upstreams examples
I am not fully sure if they are fully correct but they deployed the right syntax.
1 parent 1222c82 commit de4b124

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎nixos/modules/services/web-servers/nginx/default.nix

+8
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ in
662662
Defines the address and other parameters of the upstream servers.
663663
'';
664664
default = {};
665+
example = { "127.0.0.1:8000" = {}; };
665666
};
666667
extraConfig = mkOption {
667668
type = types.lines;
@@ -676,6 +677,13 @@ in
676677
Defines a group of servers to use as proxy target.
677678
'';
678679
default = {};
680+
example = {
681+
"backend_server" = {
682+
servers = { "127.0.0.1:8000" = {}; };
683+
extraConfig = ''
684+
keepalive 16;
685+
'';
686+
};
679687
};
680688

681689
virtualHosts = mkOption {

0 commit comments

Comments
 (0)
Please sign in to comment.