Hi all, I’m having some trouble to get Collabora Online working behind Nginx reverse proxy
Here my configuration:
- Slave UCS server with Nextcloud and Collabora Online installed from AppCenter (so, as container)
- Reverse proxy based on Debian with nginx installed and configured
- Fixed public IP address associated with DNS entry
Here the Nginx reverse proxy configuration (https://www.collaboraoffice.com/code/nginx-reverse-proxy/ - 2. SSL terminates at the proxy):
server {
listen 443 ssl;
ssl on;
include snippets/letsencrypt.conf;
server_name FQDN_OF_THE_SERVER;
location / {
proxy_pass https://PRIVATE_IP_OF_UCS;
proxy_redirect https://PRIVATE_IP_OF_UCS/ https://$host/nextcloud/;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# static files
location ^~ /loleaflet {
proxy_pass http://PRIVATE_IP_OF_UCS:9980;
proxy_set_header Host $http_host;
}
# WOPI discovery URL
location ^~ /hosting/discovery {
proxy_pass http://PRIVATE_IP_OF_UCS:9980;
proxy_set_header Host $http_host;
}
# Capabilities
location ^~ /hosting/capabilities {
proxy_pass http://PRIVATE_IP_OF_UCS:9980;
proxy_set_header Host $http_host;
}
# main websocket
location ~ ^/lool/(.*)/ws$ {
proxy_pass http://PRIVATE_IP_OF_UCS: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://PRIVATE_IP_OF_UCS:9980;
proxy_set_header Host $http_host;
}
# Admin Console websocket
location ^~ /lool/adminws {
proxy_pass http://PRIVATE_IP_OF_UCS:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}
}
Here the behaviour:
-
When i try to configure Collabora Online app in nextcloud I always get “Could not establish connection to the Collabora Online server”
-
If I try to access https://FQDN/hosting/capabilities and https://FQDN/hosting/discovery both work as expected
Any hints?
Thanks so much for your help