add cdn to proxy

This commit is contained in:
Satria 2026-03-01 09:41:25 +07:00
commit 5246d65afb
2 changed files with 3 additions and 6 deletions

View file

@ -1,7 +1,8 @@
{ homelab, ... }: let { homelab, ... }: let
base = "proxy.${homelab.domain}"; base = "proxy.${homelab.domain}";
proxyMappings = { proxyMappings = {
"dns" = { dest = "http://localhost:8088"; auth = true; }; "dns" = { dest = "http://localhost:8088"; auth = true; };
"cdn" = { dest = "http://localhost:3000"; auth = false; };
}; };
in { in {
users.users.nginx.extraGroups = [ "acme" ]; users.users.nginx.extraGroups = [ "acme" ];

View file

@ -3,12 +3,8 @@
httpd = { httpd = {
enable = true; enable = true;
virtualHosts."cdn" = { virtualHosts."cdn" = {
listen = [{ ip = "*"; port = 3000; }]; listen = [{ ip = "127.0.0.1"; port = 3000; }];
documentRoot = "/mnt/share"; documentRoot = "/mnt/share";
extraConfig = ''
Options +Indexes +FollowSymLinks
Require all granted
'';
}; };
}; };