vhost: added host
This commit is contained in:
parent
6389d1950a
commit
7f2c129ea9
@ -91,6 +91,12 @@ in
|
|||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
host = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The host for the location.";
|
||||||
|
default = "127.0.0.1";
|
||||||
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "The port number for the location.";
|
description = "The port number for the location.";
|
||||||
@ -126,7 +132,7 @@ in
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations = mapAttrs
|
locations = mapAttrs
|
||||||
(path: location: {
|
(path: location: {
|
||||||
proxyPass = "http://127.0.0.1:${toString location.port}";
|
proxyPass = "http://${location.host}:${toString location.port}";
|
||||||
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