Docker-CODE icon indicating copy to clipboard operation
Docker-CODE copied to clipboard

[Question] How do I setup Collabora for NextCloud?

Open Ryu945 opened this issue 5 years ago • 0 comments

I took this from https://www.collaboraoffice.com/code/nginx-reverse-proxy/

    # 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_iheader Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $http_host;
        proxy_read_timeout 36000s;
    }

I trimmed configuration options already in the file generated by Ngnix so there was no duplicates. I also changed it to my website url. That only left.

    location ^~ /loleaflet {
        proxy_pass https://website.com;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        proxy_pass https://website.com;
    }

    # Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass https://website.com;
    }

    # main websocket
    location ~ ^/lool/(.*)/ws$ {
        proxy_pass https://website.com;
        proxy_read_timeout 36000s;
    }

    # download, presentation and image upload
    location ~ ^/lool {
        proxy_pass https://website.com;
    }

    # Admin Console websocket
    location ^~ /lool/adminws {
        proxy_pass https://website.com;
        proxy_read_timeout 36000s;
    }

I placed it where the collabora's website configurations were located and changed nothing else. This did not allow me to open a file in Nextcloud. I then tried referencing by docker compose file reference.

    location ^~ /loleaflet {
        proxy_pass https://collabora:9980;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        proxy_pass https://collabora:9980;
    }

    # Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass https://collabora:9980;
    }

    # main websocket
    location ~ ^/lool/(.*)/ws$ {
        proxy_pass https://collabora:9980;
        proxy_read_timeout 36000s;
    }

    # download, presentation and image upload
    location ~ ^/lool {
        proxy_pass https://collabora:9980;
    }

    # Admin Console websocket
    location ^~ /lool/adminws {
        proxy_pass https://collabora:9980;
        proxy_read_timeout 36000s;
    }

This did not let me open a file in NextCloud

For reference, my Nextcloud container finds the server just fine when I reference it by https://collabora:9980 . In every situation, files refuse to open in Nextcloud.

When I try navigating to the Collabora server websites listed in the proxy settings. I go to website.com just fine. It simply gives me the message "Ok"

Website.com/lool/adminws is a plank page but the page does exist.

Ryu945 avatar Nov 15 '20 18:11 Ryu945