Nginx NextCloud 安装Collabora Online Office

25 8月

1、安装Docker

2、安装Collabora Online Office

docker pull collabora/code
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=cloud\\.nextcloud\\.com' --restart always --cap-add MKNOD collabora/code

这里的cloud.nextcloud.com替换成你自己nextcloud的域名

3、配置Collbora Online Office的访问域名,这里以office.actom.me为例;

server {
    listen       443 ssl;
    server_name  office.actom.me;

    ssl_certificate /path/to/certficate; #你自己的证书地址
    ssl_certificate_key /path/to/key;    #你自己的证书地址

    # 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;
    }

   # 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;
   }
}

4、设置nextcloud的远程协作地址为:https://office.actom.me(这里换成你自己的地址)

发表评论

邮箱地址不会被公开。 必填项已用*标注