options: added path to nginx server service
This commit is contained in:
parent
8de07dad91
commit
0893feb26d
@ -101,12 +101,17 @@ in
|
|||||||
type = types.int;
|
type = types.int;
|
||||||
description = "The port number for the location.";
|
description = "The port number for the location.";
|
||||||
};
|
};
|
||||||
|
|
||||||
allow = mkOption {
|
allow = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = "IP address or CIDR block to allow.";
|
description = "IP address or CIDR block to allow.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
path = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
|
||||||
deny = mkOption {
|
deny = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
@ -132,7 +137,7 @@ in
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations = mapAttrs
|
locations = mapAttrs
|
||||||
(path: location: {
|
(path: location: {
|
||||||
proxyPass = "http://${location.host}:${toString location.port}";
|
proxyPass = "http://${location.host}:${toString location.port}${location.path}";
|
||||||
proxyWebsockets = location.proxyWebsockets;
|
proxyWebsockets = location.proxyWebsockets;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
${optionalString location.allowLan "deny 10.0.0.1;"}
|
${optionalString location.allowLan "deny 10.0.0.1;"}
|
||||||
|
Loading…
Reference in New Issue
Block a user