From 4939beab9bb5c182cae4713e8d3b1b458ef2dc0c Mon Sep 17 00:00:00 2001 From: Random936 Date: Wed, 26 Mar 2025 11:16:03 -0700 Subject: [PATCH] Updates to media nginx subdomains --- config/media.nix | 85 ++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/config/media.nix b/config/media.nix index 8f4998c..a6eaefe 100644 --- a/config/media.nix +++ b/config/media.nix @@ -103,64 +103,63 @@ services.nginx = { enable = true; virtualHosts = { + # Landing Page (randomctf.com) + "randomctf.com" = { + enableACME = true; + forceSSL = true; + root = "/var/www/randomctf.com"; + }; - # Landing Page (randomctf.com) - "randomctf.com" = { - enableACME = true; - forceSSL = true; - root = "/var/www/randomctf.com"; - }; + # Nextcloud + ${config.services.nextcloud.hostName} = { + enableACME = true; + forceSSL = true; + }; - # Nextcloud - ${config.services.nextcloud.hostName} = { - enableACME = true; - forceSSL = true; - }; + # Jellyfin + "media.randomctf.com" = { + enableACME = true; + forceSSL = true; - # Jellyfin - "media.randomctf.com" = { + extraConfig = '' + access_log /var/log/nginx/access.media.log; + ''; + + locations."/".extraConfig = '' + proxy_buffering off; + proxy_pass http://localhost:8096/; + ''; + }; + + # Gitea + "git.randomctf.com" = { enableACME = true; forceSSL = true; extraConfig = '' - access_log /var/log/nginx/access.media.log; + access_log /var/log/nginx/access.git.log; ''; locations."/".extraConfig = '' proxy_buffering off; - proxy_pass http://localhost:8096/; + proxy_pass http://localhost:3300/; ''; - }; + }; - # Gitea - "git.randomctf.com" = { - enableACME = true; - forceSSL = true; + # Notifier CSE115A + "notifier-api.randomctf.com" = { + enableACME = true; + forceSSL = true; - extraConfig = '' - access_log /var/log/nginx/access.git.log; - ''; + extraConfig = '' + access_log /var/log/nginx/access.cse115a.log; + ''; - locations."/".extraConfig = '' - proxy_buffering off; - proxy_pass http://localhost:3300/; - ''; - }; - - # Notifier CSE115A - "notifier-api.randomctf.com" = { - enableACME = true; - forceSSL = true; - - extraConfig = '' - access_log /var/log/nginx/access.cse115a.log; - ''; - - locations."/".extraConfig = '' - proxy_buffering off; - proxy_pass http://localhost:5000/; - ''; - }; + locations."/".extraConfig = '' + proxy_buffering off; + proxy_pass http://localhost:5000/; + ''; + }; }; };