Still testing nginx

This commit is contained in:
rasmus-kirk
2024-08-30 23:35:37 +02:00
parent 8e89c15e1e
commit 31484ce375
2 changed files with 24 additions and 2 deletions
+2 -2
View File
@@ -94,8 +94,8 @@ in {
vpnnamespaces.wg = mkIf cfg.vpn.enable {
portMappings = [
{
from = defaultPort;
to = defaultPort;
from = 8787;
to = 8787;
}
];
};
+22
View File
@@ -451,5 +451,27 @@ in {
}
];
};
services.nginx = mkIf cfg.vpn.enable {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
virtualHosts."127.0.0.1:${builtins.toString cfg.uiPort}" = {
listen = [
{
addr = "0.0.0.0";
port = cfg.uiPort;
}
];
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://192.168.15.1:${builtins.toString cfg.uiPort}";
};
};
};
};
}