Problem with Onlyoffice Integration - Onlyoffice isn't under /onlyofficeds/


#1

Hello.

I want to integrate Onlyoffice in Seafile.
I have installed Onlyoffice with docker.
The Nginx config is like the sample on this page https://manual.seafile.com/deploy/only_office.html
I use the subfolder solution.
But when I open a Document in seafile, for example a *.docx, I only see a white page without any errors.
I think the problem is that I found the welcome page of onlyoffice under //192.168.1.100:88/welcome/ and not //192.168.1.100:88/onlyofficeds/welcome/
But I don’t know how can I fix it.

Please can you help me?
My Seafile Server Version is 6.1.1 Community

And sorry for my really bad English.

Best regards

NCC1701


Dockerized seafile and onlyoffice
#2

Hi @NCC1701,

pls post your Nginx config and the OnlyOffice part of seahub_settings


#3

Hi @TMHBOFH

Nginx config

server {
    listen 8444 ssl;
    listen [::]:8444 ssl;
    ssl_certificate     /etc/ssl/certs/openmediavault-091d2997-4b49-4472-8c36-e707a73b7137.crt;
    ssl_certificate_key /etc/ssl/private/openmediavault-091d2997-4b49-4472-8c36-e707a73b7137.key;
    server_name platzhalter.de;
    index index.html;
    access_log /var/log/nginx/d9b55093-bb1b-415c-ba9c-74399d4b4a27-access.log;
    error_log  /var/log/nginx/d9b55093-bb1b-415c-ba9c-74399d4b4a27-error.log;
    large_client_header_buffers 4 8k;
	
#
# seahub
#
location / {
        fastcgi_pass    127.0.0.1:8000;
        fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
        fastcgi_param   PATH_INFO           $fastcgi_script_name;

        fastcgi_param    SERVER_PROTOCOL        $server_protocol;
        fastcgi_param   QUERY_STRING        $query_string;
        fastcgi_param   REQUEST_METHOD      $request_method;
        fastcgi_param   CONTENT_TYPE        $content_type;
        fastcgi_param   CONTENT_LENGTH      $content_length;
        fastcgi_param    SERVER_ADDR         $server_addr;
        fastcgi_param    SERVER_PORT         $server_port;
        fastcgi_param    SERVER_NAME         $server_name;
        fastcgi_param   REMOTE_ADDR         $remote_addr;
        fastcgi_param    HTTPS                on;
        fastcgi_param    HTTP_SCHEME            https;

        access_log      /var/log/nginx/seahub.access.log;
        error_log       /var/log/nginx/seahub.error.log;
        fastcgi_read_timeout 36000;
    }

#
# seafile
#
    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;
        client_max_body_size 10G;
        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;
        send_timeout  36000s;
    }
location /media {
root /home/seafile/seafile-server-latest/seahub;
}
#
# seafdav (webdav)
#
 location /seafdav {
        fastcgi_pass    127.0.0.1:8080;
        fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
        fastcgi_param   PATH_INFO           $fastcgi_script_name;
        fastcgi_param   SERVER_PROTOCOL     $server_protocol;
        fastcgi_param   QUERY_STRING        $query_string;
        fastcgi_param   REQUEST_METHOD      $request_method;
        fastcgi_param   CONTENT_TYPE        $content_type;
        fastcgi_param   CONTENT_LENGTH      $content_length;
        fastcgi_param   SERVER_ADDR         $server_addr;
        fastcgi_param   SERVER_PORT         $server_port;
        fastcgi_param   SERVER_NAME         $server_name;
        fastcgi_param   HTTPS               on;
        client_max_body_size 0;
        access_log      /var/log/nginx/seafdav.access.log;
        error_log       /var/log/nginx/seafdav.error.log;
  }

#
# onlyofficeds
#

location /onlyofficeds/ {

        # THIS ONE IS IMPORTANT ! - Trailing slash !
        proxy_pass http://127.0.0.1:88/;

        proxy_http_version 1.1;
        client_max_body_size 100M; # Limit Document size to 100MB
        proxy_read_timeout 3600s;
        proxy_connect_timeout 3600s;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $proxy_connection;

        # THIS ONE IS IMPORTANT ! - Subfolder and NO trailing slash !
        proxy_set_header X-Forwarded-Host $the_host/onlyofficeds;

        proxy_set_header X-Forwarded-Proto $the_scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

}


server {
    listen 443 ssl;
    listen [::]:443 ssl;
    ssl_certificate     /etc/ssl/certs/openmediavault-091d2997-4b49-4472-8c36-e707a73b7137.crt;
    ssl_certificate_key /etc/ssl/private/openmediavault-091d2997-4b49-4472-8c36-e707a73b7137.key;
    server_name platzhalter.de;
    set $root_path "/media/25b019ed-ffb6-45f2-891e-71cdc7f26a39/wordpress";
    root $root_path;
    index index.html index.php;
    set $socket "unix:/var/run/fpm-8c9e09b9-0c1a-4fc2-920a-a739773cac33.sock";
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass $socket;
    }
    access_log /var/log/nginx/f1f22075-096d-432a-bdba-88aeb58ccf17-access.log;
    error_log  /var/log/nginx/f1f22075-096d-432a-bdba-88aeb58ccf17-error.log;
    large_client_header_buffers 4 8k;
    if (!-e $request_filename) { rewrite ^.* /index.php break; }

# set client body size to 256M #
client_max_body_size 256M;
}

seahub_settings.py

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = True
ONLYOFFICE_APIJS_URL = ‘https://platzhalter.de/onlyofficeds/web-apps/apps/api/documents/api.js
ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)


#5

I just noticed your post as I’ve been playing with OnlyOffice integration and have been seeing a lot of white pages.

Your setup/configuration is interesting. It seems to combine elements of both the Subdomain and Subdirectory approaches. Which method do you want to use?

Have you solved this problem already?


#6

I also use both, but on a separate server. This works just fine. Long, random subfolder string. Since the token pull request was not yet merged this provides at least some sort of security.


#7

Any news on this topic? I have got exactly the same problem. When i call

https://mydomain:port/onlyofficeds/welcome

i get

https://mydomain:port/welcome

but when i call onlyoffice directly under

http://ip-adress:88/welcome

it works just fine.

THX
themmm


#8

Same here. i followed the install thing, and now it says not found, no preview neither editor window but when i call under ipadress:88/welcome it is there, but do i run it on /onlyofficeds/welcome no avail

I’d really appreciate someone shed some light on it.

Thanks and best
jM


#9

If I understand your problems correctly you’ll have to check your nginx config.
The reverse proxy might not be set correctly.

Do you want to run the server under a different port or just as subfolder with :443 where Seafile is running?