Collabora can't open files


#1

Opening a file in collabora results in the error

[error] 882#882: *377 open() “/var/www/pydio/wopi/files/token/doc.docx” failed (2: No such file or directory), client: 1.2.3.4, server: pydio.domain.com, request: "GET /wopi/files/token/doc.docx?access_token etc

It seems similar to Collabora Online (using Docker) - Errors

but I’m using nginx

server {
    listen 443;
    server_name pydio.domain.com;

    ssl_certificate /etc/ssl/bundle.pem;
    ssl_certificate_key /etc/ssl/privkey.pem;
    root /var/www/pydio;
    index index.php index.html;
    client_max_body_size 20G;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";
    keepalive_requests    10;
    keepalive_timeout     60 60;
    client_body_buffer_size 128k;

    location / {

        }

    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
    expires max;
    add_header Pragma public;
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }


    location ~ \.php$ {
	try_files $uri =404;
	fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php7-fpm.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
    }
           # Manually deny some paths to ensure Pydio security
    location ~* ^/(?:\.|conf|core|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
                deny all;
        }

}
types {
        application/font-woff2                 woff2;
}
server {
    listen   443;
    server_name  collabora.domain.com;

    ssl_certificate /etc/ssl/bundle.pem;
    ssl_certificate_key /etc/ssl/privkey.pem;

    # static files
    location ^~ /loleaflet {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
        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;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        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;
    }
}

Am i missing something?

  • collabora latest in docker
  • pydio8

#2

There is an error in rewrite rules
Please try to translate the rewrite rules in apache => nginx config


#3

which rewrite rule do you think is broken?

I’ve tried https://icewind.nl/entry/collabora-online/
and https://github.com/nextcloud/richdocuments/issues/47#issuecomment-304118374
but no luck


#4

Here is configuration of collabora with apache config. https://pydio.com/en/docs/v8/install-collabora-online
Unfortunately I have no config for nginx.