26 lines
580 B
Nix
26 lines
580 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: {
|
|
# HTTP
|
|
services.nginx.virtualHosts = let
|
|
makeVirtualHost = target: {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = target;
|
|
proxyWebsockets = true;
|
|
extraConfig = ''
|
|
proxy_ssl_server_name on;
|
|
proxy_pass_header Authorization;
|
|
'';
|
|
};
|
|
};
|
|
in {
|
|
"ha.gssws.de" = makeVirtualHost "http://10.0.1.11:8123";
|
|
"ha2.gssws.de" = makeVirtualHost "http://10.0.1.11:8123";
|
|
"ha.karinsokolowski.de" = makeVirtualHost "http://10.0.1.13:8123";
|
|
};
|
|
}
|