seafile集成onlyoffice后,没有实现在线预览编辑功能

当前服务器版本 Centos 7

seafile已经成功安装,Web界面正常登录,现在需要把onlyoffice集成到seafile中,实现在线文档预览编辑功能,已经用docker-compose.yml成功拉取的onlyoffice,并且按照文档修改了seahub_settings.py文件,重启seafile后查看发现文档在线预览编辑功能并未实现。
求教,目前不知道问题出在哪里了。

docker-compose.yml配置:

version: ‘3’
services:
db:
image: mariadb:10.11
restart: always
environment:

  • MYSQL_ROOT_PASSWORD=xxxxxxx #mysql数据库密码
  • MYSQL_LOG_CONSOLE=true
  • MARIADB_AUTO_UPGRADE=1
    volumes:
  • /home/test/seafile/mysql:/var/lib/mysql
    networks:
  • seafile-net

memcached:
image: memcached:1.6.18
restart: always
entrypoint: memcached -m 256
networks:

  • seafile-net

seafile:
image: seafileltd/seafile-mc:11.0-latest
restart: always
ports:

  • “8888:80”
  • “8082:8082”
    volumes:
  • /home/test/seafile/shared:/shared
    environment:
  • DB_HOST=db
  • DB_ROOT_PASSWORD= #mysql数据库密码
  • TIME_ZONE=Asia/Shanghai
  • SEAFILE_ADMIN_EMAIL=xxxxx@xxxxxx.com #seafile账号
  • SEAFILE_ADMIN_PASSWORD=Seafile@2025! #密码
  • SEAFILE_SERVER_LETSENCRYPT=false
  • SEAFILE_SERVER_HOSTNAME=x.x.x.x #服务器公网ip
    depends_on:
  • db
  • memcached
    networks:
  • seafile-net

onlyoffice:
image: onlyoffice/documentserver
container_name: onlyoffice
restart: always
ports:

  • “8889:80”
    volumes:
  • /home/test/onlyoffice/logs:/var/log/onlyoffice
  • /home/test/onlyoffice/data:/var/www/onlyoffice/Data
  • /home/test/onlyoffice/fonts:/usr/share/fonts/truetype/custom
    environment:
  • JWT_ENABLED=true
  • JWT_SECRET=abcdefg
    networks:
  • seafile-net

networks:
seafile-net:

seahub_setting.py配置:

#Enable OnlyOffice

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
ONLYOFFICE_APIJS_URL = ‘http://x.x.x.x:8889/web-apps/apps/api/documents/api.js’
ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)
ONLYOFFICE_EDIT_FILE_EXTENSION = (‘docx’, ‘pptx’, ‘xlsx’)

ONLYOFFICE_FORCE_SAVE = True

ONLYOFFICE_JWT_SECRET = ‘abcdefg’

检查下nginx配置文件中相关配置是否已添加,11.0集成onlyoffice参照这个文档Deploy OnlyOffice with Docker - Seafile Admin Manual

你好,我用http://ip+端口这种应该怎么配置呢,我看文档是用的https这种

一样的,只是把onlyoffice模块放到80端口下的配置中就行了

大佬,帮我看看,我按照文档配的,怎么还是不行呀,我看不出哪里有问题了谢谢。

点开就是这样。。。。

你这种情况多半是onlyoffice的服务器访问不到seafile的服务器,我建议你使用https部署,也或许是onlyoffice强制需要ssl呢

看截图配置不对。onlyoffice容器名称是seafile-onlyoffice,可是nginx转发地址是onlyoffice

他的容器名称就是onlyoffice,其实我倒是觉得没必要nginx转发,单独给onlyoffice拉一个docker容器就可以

我也是偶到同样的问题,集成onlyOFFICE的问题

location /onlyofficeds/ {
proxy_pass http://127.0.0.1/;
proxy_http_version 1.1;
client_max_body_size 100M;
proxy_read_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
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;
}

nginx的配置: proxy_pass 这个不知道 怎么写?

目前Seafile最新版本是13.0,建议升级到13.0后按照官方文档集成onlyoffice: seafile-manual-cn