diff --git a/configs/sputnik/nginx.nix b/configs/sputnik/nginx.nix index a2be921..b06ebec 100644 --- a/configs/sputnik/nginx.nix +++ b/configs/sputnik/nginx.nix @@ -5,6 +5,7 @@ services.nginx = { enable = true; + recommendedProxySettings = true; virtualHosts = { "git.ingolf-wagner.de" = { @@ -201,12 +202,6 @@ locations."/" = { proxyPass = "http://workhorse.private:3030"; 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-Host $server_name; - proxy_set_header X-Forwarded-Proto https; - sub_filter "http://seafile.gaykraft.com" "https://seafile.gaykraft.com"; # used for view/edit office file via Office Online Server diff --git a/configs/workhorse/nextcloud.nix b/configs/workhorse/nextcloud.nix index d04f955..e9093d8 100644 --- a/configs/workhorse/nextcloud.nix +++ b/configs/workhorse/nextcloud.nix @@ -1,6 +1,5 @@ { pkgs, ... }: { - # setup nextcloud in a container containers.nextcloud = { bindMounts = { @@ -56,12 +55,26 @@ # host nginx setup services.nginx = { enable = true; + recommendedProxySettings = true; virtualHosts = { "nextcloud.workhorse.private" = { + serverAliases = + [ "nextcloud.ingolf-wagner.de" "nextcloud.gaykraft.com" ]; locations."/" = { proxyPass = "http://192.168.100.11"; extraConfig = '' + + # rewrite response bodies + # ----------------------- sub_filter "192.168.100.11" "nextcloud.workhorse.private"; + + # rewrite redirects + # ----------------- + #proxy_redirect http://192.168.100.11:80/ http://$host:$server_port/; + #proxy_redirect 192.168.100.11 nextcloud.workhorse.private; + + # allow big uploads + # ----------------- client_max_body_size 0; ''; };