This commit is contained in:
Sakooooo 2025-01-05 15:55:20 +04:00
parent 13e0ad9b34
commit 231ee6be75
Signed by: sako
GPG key ID: FE52FD65B76E4751

View file

@ -130,29 +130,49 @@ in {
users.groups = users.groups =
mkIf (cfg.group == "codeberg-pages") { codeberg-pages = { }; }; mkIf (cfg.group == "codeberg-pages") { codeberg-pages = { }; };
services.nginx.virtualHosts = { # services.nginx.virtualHosts = {
"pages.sako.lol" = { # "pages.sako.lol" = {
listen = [{ # listen = [{
addr = "0.0.0.0"; # addr = "0.0.0.0";
port = 443; # port = 443;
ssl = true; # ssl = true;
}]; # }];
locations."/" = { proxyPass = "http://localhost:4563"; }; # locations."/" = { proxyPass = "http://localhost:4563"; };
extraConfig = '' # extraConfig = ''
# ssl_preread on;
# '';
# };
# "*.pages.sako.lol" = {
# listen = [{
# addr = "0.0.0.0";
# port = 443;
# ssl = true;
# }];
# locations."/" = { proxyPass = "http://localhost:4563"; };
# extraConfig = ''
# ssl_preread on;
# '';
# };
# };
services.nginx.streamConfig = ''
server {
listen 443 pages.sako.lol;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass localhost:4563;
ssl_preread on; ssl_preread on;
''; }
}; server {
"*.pages.sako.lol" = { listen 443 *.pages.sako.lol;
listen = [{
addr = "0.0.0.0"; proxy_connect_timeout 1s;
port = 443; proxy_timeout 3s;
ssl = true;
}]; proxy_pass localhost:4563;
locations."/" = { proxyPass = "http://localhost:4563"; };
extraConfig = ''
ssl_preread on; ssl_preread on;
}
''; '';
}; };
};
};
} }