I’m not sure what specifically causes the issue, but it’s very likely related to your reverse proxy configuration. Possibly a combination of incorrect routing due to incorrect or missing redirects and it seems also to cause some HTTP/HTTPS mismatch.
One thing I can say for sure, though: You should not bind port 9080 of the Collabora container to the public IP of your VPS. Instead, bind it to 127.0.0.1
(localhost), and have your reverse proxy forward requests to 127.0.0.1:9080
rather than <PUBLIC-IP>:9080
. The same goes for all the other services where you’re doing the same thing.
See see here how the Collabora integration generally works including many tips and explanations and helpful links: Collabora integration guide
This may be helpful as well: 101: reverse proxy
Also, on a VPS with a public facing IP address, I see no reason to use NGINX Proxy manager. Just use standard NGINX with multiple server blocks, which then would look something like this:
For Nextcloud:
server {
listen 443 ssl;
server_name cloud.its-egner.de;
Your Nextcloud webserver config here
For Collabora: (based on this: Proxy settings — SDK https://sdk.collaboraonline.com/ documentation)
server {
listen 443 ssl;
server_name office.its-egner.de;
ssl_certificate /path/to/certificate;
ssl_certificate_key /path/to/key;
# static files
location ^~ /browser {
proxy_pass http://127.0.0.1:9980;
proxy_set_header Host $host;
}
# WOPI discovery URL
location ^~ /hosting/discovery {
proxy_pass http://127.0.0.1:9980;
proxy_set_header Host $host;
}
# Capabilities
location ^~ /hosting/capabilities {
proxy_pass http://127.0.0.1:9980;
proxy_set_header Host $host;
}
# main websocket
location ~ ^/cool/(.*)/ws$ {
proxy_pass http://127.0.0.1:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 36000s;
}
# download, presentation and image upload
location ~ ^/(c|l)ool {
proxy_pass http://127.0.0.1:9980;
proxy_set_header Host $host;
}
# Admin Console websocket
location ^~ /cool/adminws {
proxy_pass http://127.0.0.1:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 36000s;
}
}
You need to explictly allow the second Nextcloud to access the WOPI host. See here: Important changes regarding COOL/CODE docker versions from v21.11.3.6 on (multiple domains setup) - #2 by wwe