Iām trying to set up Collabora. While the server seems to be running and connected with the collabora app, opening an ods file from nextcloud results in āUnauthorized WOPI hostā.
Iām using Nextcloud 17.0.4, Ubuntu 18.04, Docker image collabora/code
. Nextcloud is available under domainname.de/owncloud
for historical reasons. The docker image is accessible from the outside via domainname.de:449
through an nginx reverse proxy. Subdomains are not possible.
I started the docker image with the following settings:
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=domainname\\.de/owncloud' --restart always --cap-add MKNOD collabora/code
This is my nginx config:
server {
listen 449 ssl;
server_name domainname.de;
ssl_certificate /etc/letsencrypt/live/domainname.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domainname.de/privkey.pem;
include /etc/nginx/sites-available/sharedssl.conf;
# static files
location ^~ /loleaflet {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
}
# WOPI discovery URL
location ^~ /hosting/discovery {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
}
# Capabilities
location ^~ /hosting/capabilities {
proxy_pass https://localhost:9980;
proxy_set_header Host $http_host;
}
# main websocket
location ~ ^/lool/(.*)/ws$ {
proxy_pass https://localhost: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 https://localhost:9980;
proxy_set_header Host $http_host;
}
# Admin Console websocket
location ^~ /lool/adminws {
proxy_pass https://localhost:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}
}
Maybe Collabora doesnāt like nextcloud running in a subdirectory like domainname.de/owncloud
?
EDIT: My setup wasnāt described very clearly, I apologize for that. Here are some more details: NGINX reverse proxy: Unauthorized WOPI host