# The home-server project produces a multi-purpose setup using Ansible. # Copyright © 2018–2023 Y. Gablin, under the GPL-3.0-or-later license. # Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing. # Nextcloud BUG location ~ (?:{{http_pfx_nextcloud}})+/index.php/apps/richdocuments/(?:css|js|img|l10n|assets) { rewrite ^(?:{{http_pfx_nextcloud}})+/index.php/apps/richdocuments(.*)$ {{http_pfx_nextcloud}}/index.php/xapps/richdocuments$1$is_args$query_string; } # https://www.collaboraoffice.com/code/nginx-reverse-proxy/ # static files location ^~ /loleaflet { proxy_pass http://{{SafeZone}}:9980; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting/discovery { proxy_pass http://{{SafeZone}}:9980; proxy_set_header Host $http_host; } # Capabilities location ^~ /hosting/capabilities { proxy_pass http://{{SafeZone}}:9980; proxy_set_header Host $http_host; } location ^~ /lool { # this parent location makes sure that a global PHP catch-all # won’t pre-empt the first two child locations below # main websocket location ~ ^/lool/(.*)/ws$ { proxy_pass http://{{SafeZone}}:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } # download, presentation and image upload location ~ ^/lool { proxy_pass http://{{SafeZone}}:9980; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /lool/adminws { proxy_pass http://{{SafeZone}}:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } }