feat(compute01): init pages server #151

Open
Luj wants to merge 3 commits from init-dgnum-page into main
Showing only changes of commit e4cc002f6f - Show all commits

View file

@ -69,19 +69,33 @@ in
}; };
services.nginx = { services.nginx = {
defaultListen = [
{
addr = "127.0.0.1";
port = 8446;
ssl = true;
proxyProtocol = true;
}
{
addr = "0.0.0.0";
ssl = false;
}
];
streamConfig = '' streamConfig = ''
map $ssl_preread_server_name $sni_upstream { map $ssl_preread_server_name $sni_upstream {
hostnames;
default 127.0.0.1:8010; default 127.0.0.1:8010;
${lib.concatMapStringsSep "\n" (vhost: " ${vhost} 127.0.0.1:8446;") ( ${
lib.attrNames config.services.nginx.virtualHosts lib.concatMapStringsSep "\n " (vhost: "${vhost} 127.0.0.1:8446;") (
)} lib.attrNames config.services.nginx.virtualHosts
)
}
} }
server { server {
listen 443; listen 443;
ssl_preread on; ssl_preread on;
proxy_pass $sni_upstream; proxy_pass $sni_upstream;
proxy_protocol on;
} }
''; '';