{"id":1251,"date":"2017-08-25T23:35:20","date_gmt":"2017-08-25T15:35:20","guid":{"rendered":"https:\/\/actom.me\/blog\/?p=1251"},"modified":"2017-08-25T23:35:20","modified_gmt":"2017-08-25T15:35:20","slug":"nginx-nextcloud-%e5%ae%89%e8%a3%85collabora-online-office","status":"publish","type":"post","link":"https:\/\/actom.me\/blog\/nginx-nextcloud-%e5%ae%89%e8%a3%85collabora-online-office.html","title":{"rendered":"Nginx NextCloud \u5b89\u88c5Collabora Online Office"},"content":{"rendered":"<p>1\u3001\u5b89\u88c5Docker<\/p>\n<p>2\u3001\u5b89\u88c5Collabora Online Office<\/p>\n<pre class=\"lang:sh decode:true \">docker pull collabora\/code\r\ndocker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=cloud\\\\.nextcloud\\\\.com' --restart always --cap-add MKNOD collabora\/code<\/pre>\n<p>\u8fd9\u91cc\u7684cloud.nextcloud.com\u66ff\u6362\u6210\u4f60\u81ea\u5df1nextcloud\u7684\u57df\u540d<\/p>\n<p>3\u3001\u914d\u7f6eCollbora Online Office\u7684\u8bbf\u95ee\u57df\u540d\uff0c\u8fd9\u91cc\u4ee5office.actom.me\u4e3a\u4f8b\uff1b<\/p>\n<pre class=\"lang:default decode:true \">server {\r\n    listen       443 ssl;\r\n    server_name  office.actom.me;\r\n\r\n    ssl_certificate \/path\/to\/certficate; #\u4f60\u81ea\u5df1\u7684\u8bc1\u4e66\u5730\u5740\r\n    ssl_certificate_key \/path\/to\/key;    #\u4f60\u81ea\u5df1\u7684\u8bc1\u4e66\u5730\u5740\r\n\r\n    # static files\r\n    location ^~ \/loleaflet {\r\n        proxy_pass https:\/\/localhost:9980;\r\n        proxy_set_header Host $http_host;\r\n    }\r\n\r\n    # WOPI discovery URL\r\n    location ^~ \/hosting\/discovery {\r\n        proxy_pass https:\/\/localhost:9980;\r\n        proxy_set_header Host $http_host;\r\n    }\r\n\r\n   # main websocket\r\n   location ~ ^\/lool\/(.*)\/ws$ {\r\n       proxy_pass https:\/\/localhost:9980;\r\n       proxy_set_header Upgrade $http_upgrade;\r\n       proxy_set_header Connection \"Upgrade\";\r\n       proxy_set_header Host $http_host;\r\n       proxy_read_timeout 36000s;\r\n   }\r\n\r\n   # download, presentation and image upload\r\n   location ~ ^\/lool {\r\n       proxy_pass https:\/\/localhost:9980;\r\n       proxy_set_header Host $http_host;\r\n   }\r\n\r\n   # Admin Console websocket\r\n   location ^~ \/lool\/adminws {\r\n       proxy_pass https:\/\/localhost:9980;\r\n       proxy_set_header Upgrade $http_upgrade;\r\n       proxy_set_header Connection \"Upgrade\";\r\n       proxy_set_header Host $http_host;\r\n       proxy_read_timeout 36000s;\r\n   }\r\n}<\/pre>\n<p>4\u3001\u8bbe\u7f6enextcloud\u7684\u8fdc\u7a0b\u534f\u4f5c\u5730\u5740\u4e3a\uff1ahttps:\/\/office.actom.me\uff08\u8fd9\u91cc\u6362\u6210\u4f60\u81ea\u5df1\u7684\u5730\u5740\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u5b89\u88c5Docker 2\u3001\u5b89\u88c5Collabora Online Office d &#8230; <a class=\"more-link\" href=\"https:\/\/actom.me\/blog\/nginx-nextcloud-%e5%ae%89%e8%a3%85collabora-online-office.html\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/1251"}],"collection":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/comments?post=1251"}],"version-history":[{"count":1,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/1251\/revisions"}],"predecessor-version":[{"id":1252,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/1251\/revisions\/1252"}],"wp:attachment":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/media?parent=1251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/categories?post=1251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/tags?post=1251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}