From 5dc8e3f15d6b9c996ba664b872a16520e4c999a7 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 31 Jan 2019 00:19:51 +0100 Subject: [PATCH] [fix] Be able to integrate and use it in NextCloud --- conf/loolwsd.xml | 2 +- conf/nginx.conf | 36 +++++++++++++++++++++++++++++------- manifest.json | 4 ++-- scripts/remove | 3 +++ 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/conf/loolwsd.xml b/conf/loolwsd.xml index e68c0fe..3fb8166 100644 --- a/conf/loolwsd.xml +++ b/conf/loolwsd.xml @@ -62,7 +62,7 @@ false - false + true /etc/loolwsd/cert.pem /etc/loolwsd/key.pem /etc/loolwsd/ca-chain.cert.pem diff --git a/conf/nginx.conf b/conf/nginx.conf index c37ef92..5f4e4c1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,19 +1,41 @@ # static files location ^~ /loleaflet { - proxy_pass https://localhost:__PORT__; + proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting/discovery { - proxy_pass https://localhost:__PORT__; + proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } -# websockets, download, presentation and image upload -location ^~ /lool { - proxy_pass https://localhost:__PORT__; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; +# 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; +} diff --git a/manifest.json b/manifest.json index 3b63343..aeea6f2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,8 +6,8 @@ "en": "Collabora online package for YunoHost.", "fr": "Collabora online pour YunoHost." }, - "url": "https://", - "license": "free", + "url": "https://www.libreoffice.org/download/libreoffice-online/", + "license": "MPL-2.0", "maintainer": { "name": "rafi59", "email": "rafi59_dev@srvmaison.fr.nf", diff --git a/scripts/remove b/scripts/remove index 6259193..ae16a84 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,6 +26,9 @@ final_path=$(ynh_app_setting_get $app final_path) # REMOVE DEPENDENCIES #================================================= +# Fix "rm: cannot remove '/etc/apt/apt.conf.d/25loolwsd': No such file or directory" +# on apt remove +touch /etc/apt/apt.conf.d/25loolwsd # Remove metapackage and its dependencies ynh_remove_app_dependencies