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 reload3. nextcloud中配置Collabora Online
在浏览器中,打开你的nextcloud,在设置的“管理”中,找到Collabora Online

没有评论:
发表评论