This commit is contained in:
Sakooooo 2025-01-05 16:19:24 +04:00
parent 8398aa2d72
commit 2c6f65d8f8
Signed by: sako
GPG key ID: FE52FD65B76E4751

View file

@ -130,38 +130,36 @@ 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:57763"; }; # locations."/" = { proxyPass = "https://localhost:57763"; };
}; # };
"*.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:56773"; }; # locations."/" = { proxyPass = "https://localhost:56773"; };
}; # };
# };
security.acme.certs."*.pages.sako.lol" = {
credentialsFile = "/srv/secrets/porkbun";
dnsProvider = "porkbun";
webroot = null;
}; };
services.nginx.streamConfig = '' services.nginx.streamConfig = ''
server { server {
# server_name pages.sako.lol; server_name *.pages.sako.lol;
listen 57763; listen 443 ssl;
proxy_connect_timeout 1s; ssl_certificate /var/lib/acme/*.pages.sako.lol/fullchain.pem;
proxy_timeout 3s; ssl_certificate_key /var/lib/acme/*.pages.sako.lol/key.pem;
proxy_pass localhost:4563;
ssl_preread on;
}
server {
# server_name *.pages.sako.lol;
listen 56773;
proxy_connect_timeout 1s; proxy_connect_timeout 1s;
proxy_timeout 3s; proxy_timeout 3s;