From 4c265011267dc73784e0f623bf9d48c1f7fa8728 Mon Sep 17 00:00:00 2001 From: oqyude Date: Wed, 24 Sep 2025 18:51:28 +0300 Subject: [PATCH] 13123 --- nixosModules/server/nextcloud.nix | 4 ++-- nixosModules/server/nginx.nix | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/nixosModules/server/nextcloud.nix b/nixosModules/server/nextcloud.nix index b1dadca..ceadbbf 100755 --- a/nixosModules/server/nextcloud.nix +++ b/nixosModules/server/nextcloud.nix @@ -117,13 +117,13 @@ in # }; onlyoffice = { enable = true; - hostname = "office.zeroq.ru"; + hostname = "onlyoffice.local"; }; }; networking.hosts = { "0.0.0.0" = [ - "office.zeroq.ru" + "onlyoffice.local" ]; # "127.0.0.1" = [ # "nextcloud.zeroq.ru" diff --git a/nixosModules/server/nginx.nix b/nixosModules/server/nginx.nix index 45755ec..ac45e3d 100755 --- a/nixosModules/server/nginx.nix +++ b/nixosModules/server/nginx.nix @@ -40,7 +40,21 @@ # port = 11000; # } # ]; - # }; + # }; + "office.zeroq.ru" = { + forceSSL = false; + enableACME = false; + locations."/" = { + proxyPass = "onlyoffice.local"; + proxyWebsockets = true; + }; + extraConfig = '' + # Force nginx to return relative redirects. This lets the browser + # figure out the full URL. This ends up working better because it's in + # front of the reverse proxy and has the right protocol, hostname & port. + absolute_redirect off; + ''; + }; # "onlyoffice.local" = { # forceSSL = false; # enableACME = false;