From b5d95071571de62aa62783c65e8cf7ecc487d162 Mon Sep 17 00:00:00 2001 From: Grigory Shipunov Date: Tue, 24 Jan 2023 20:40:41 +0100 Subject: music: init --- hosts/cirrus/nextcloud-proxy.nix | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'hosts/cirrus/nextcloud-proxy.nix') diff --git a/hosts/cirrus/nextcloud-proxy.nix b/hosts/cirrus/nextcloud-proxy.nix index 647d29f..11fc5ed 100644 --- a/hosts/cirrus/nextcloud-proxy.nix +++ b/hosts/cirrus/nextcloud-proxy.nix @@ -16,15 +16,15 @@ sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL"; }; - services.nginx.virtualHosts."nc.oxapentane.com" = { - enableACME = true; - forceSSL = true; - extraConfig = '' + services.nginx.virtualHosts = { + "nc.oxapentane.com" = { + enableACME = true; + forceSSL = true; + extraConfig = '' client_max_body_size 512M; - ''; - locations = { - "/" = { - # extraConfig = '' return 503; ''; + ''; + locations = { + "/" = { proxyPass = "http://10.34.45.100:8080"; }; "/well-known/carddav" = { @@ -33,7 +33,29 @@ "/well-known/caldav" = { return = "301 $scheme://$host/remote.php/dav"; }; + }; + }; + "music.oxapentane.com" = { + enableACME = true; + forceSSL = true; + extraConfig = '' + client_max_body_size 32M; + ''; + locations = { + "/" = { + proxyPass = "http://10.34.45.101:4533"; + extraConfig = '' + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Protocol $scheme; + proxy_set_header X-Forwarded-Host $http_host; + proxy_buffering off; + ''; + }; }; }; +}; } -- cgit v1.3.1