2021年1月18日星期一

nextcloud进阶:安装Collabora Online应用

 nextcloud的应用有很多。Collabora Online是在线协作(word、PPT、excel的在线编辑)的一个应用。下面介绍如何安装。

1. 安装服务

通过docker安装Collabora Online的服务端。(docker在我之前的文章中已有介绍。这里不再详细介绍如何安装)

docker run --name collabora -t -d -p 127.0.0.1:9980:9980 -e 'domain=www.example.com' -e "username=xxxxxx" -e "password=xxxxxx" --restart always --cap-add MKNOD collabora/code

上面命令中的'domain=www.example.com'是Collabora Online的授权域名。也就是只有这个域名连接进来的才能接受。

2. 在浏览器中打开你的nextcloud的网页(上一篇已经介绍了nextcloud的安装),在“应用”中的“office&text”


选择安装Collabora Online
然后在nginx的配置中,增加下面的内容。如我在之前nextcloud安装文章中,在配置文件/etc/nginx/conf.d/nextcloud.conf中增加下面一段配置
    # 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_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $http_host;
        proxy_read_timeout 36000s;
    }
然后重启nginx 
nginx -s reload
3. nextcloud中配置Collabora Online
在浏览器中,打开你的nextcloud,在设置的“管理”中,找到Collabora Online
配置你的Collabora Online的URL
至此完成配置。









没有评论:

发表评论

小型网站的ubuntu服务器如何提升连接数

 当服务器有多个api应用,或者网站的时候,会出现网页打不开。但是cpu、内存等都很空闲。这种情况,有可能是网站的文件数设置不正确。 查询服务器支持的TCP连接数: ulimit -n 默认是1024 需要增加方法: 编辑/etc/security/limits.conf * s...