Onlyoffice-Documentserver: Difference between revisions

imported>Onny
Add initial page
 
Onny (talk | contribs)
Adapt alternative Caddy config
 
(4 intermediate revisions by 3 users not shown)
Line 21: Line 21:
services.nginx.virtualHosts."localhost".listen = [ { addr = "127.0.0.1"; port = 8080; } ];
services.nginx.virtualHosts."localhost".listen = [ { addr = "127.0.0.1"; port = 8080; } ];
</nowiki>}}
</nowiki>}}
=== Caddy web server ===
{{warning|Onlyoffice is very particular about it headers and if there are some missing or different than what upstream expects, a seemingly completely unrelated portion of the software like font rendering can break. The module maintainer can only fully support nginx as this is the only webserver upstream supplies config files for in their docker image}}
Instead of using the default [[Nginx]] web server, an configuration for [[Caddy]] might look like this
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
services.nginx.enable = lib.mkForce false;
users.users.nginx = {
  group = "nginx";
  isSystemUser = true;
};
users.groups.nginx = {};
services.caddy = {
  virtualHosts = {
    "office.example.org".extraConfig = ''
      reverse_proxy http://127.0.0.1:8000 {
        # Required to circumvent bug of Onlyoffice loading mixed non-https content
        header_up X-Forwarded-Proto https
      }
    '';
  };
};
</nowiki>}}
The reverse_proxy configuration directly forwards all requests to the Onlyoffice server, ignoring the default Nginx vhost.


[[Category:Server]]
[[Category:Server]]
[[Category:Applications]]
[[Category:Web Applications]]
[[Category:Web Applications]]