From d9b584fbc3de191901ac61d818fd179fe0e8e1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:23:54 +0200 Subject: [PATCH 1/2] Update nginx.conf --- conf/nginx.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index ce045d4..61686dd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,6 @@ -location ^~ __PATH__/ { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { + proxy_pass http://127.0.0.1:__PORT__/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -10,6 +12,7 @@ location ^~ __PATH__/ { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; + more_set_headers "X-Frame-Options : ALLOW-FROM https://__NEXTCLOUDDOMAIN__ always"; client_max_body_size 10M; } From 74d9b9d3a3cf1e7b627c34ff32353eb1866d04e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:29:45 +0200 Subject: [PATCH 2/2] fix --- scripts/install | 14 -------------- scripts/restore | 18 ++---------------- scripts/upgrade | 4 ++-- 3 files changed, 4 insertions(+), 32 deletions(-) diff --git a/scripts/install b/scripts/install index 15624bc..4783951 100644 --- a/scripts/install +++ b/scripts/install @@ -123,9 +123,6 @@ echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set- #================================================= ynh_script_progression --message="Install OnlyOffice..." -# keyserver.ubuntu.com response an error 500 regularly -#apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 2>/dev/null - # The OnlyOffice dev had the magnificent idea to add a "nginx restart" during # the install/configure of their package, which is awful since that will # restart NGINX and the whole webadmin and maybe even the YunoHost command @@ -150,17 +147,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R ds:ds "$final_path" -#================================================= -# GENERIC FINALIZATION -#================================================= -# START SYSTEMD SERVICE -#================================================= -# ynh_script_progression --message="Starting a systemd service..." - -# supervisorctl reload - -# sleep 30 - #================================================= # REGENERATE FONTS #================================================= diff --git a/scripts/restore b/scripts/restore index f4ad5e3..dbad15d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -60,7 +60,7 @@ ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies -ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian/ buster main contrib" --package=$contrib_dependencies --key="https://ftp-master.debian.org/keys/release-$(lsb_release --release --short).asc" +ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian/ buster main contrib" --package="ttf-mscorefonts-installer" --key="https://ftp-master.debian.org/keys/release-$(lsb_release --release --short).asc" #================================================= # RESTORE THE NGINX CONFIGURATION @@ -94,10 +94,7 @@ echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set- #================================================= ynh_script_progression --message="Reinstalling OnlyOffice..." -# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 - -# ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package=$extra_dependencies --key="https://ftp-master.debian.org/keys/release-$(lsb_release --release --short).asc" -ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package=$extra_dependencies --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" +ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package="onlyoffice-documentserver" --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" #================================================= # RESTORE THE CONFIGURATION @@ -127,17 +124,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R ds:ds "$final_path" -#================================================= -# GENERIC FINALIZATION -#================================================= -# START SYSTEMD SERVICE -#================================================= -# ynh_script_progression --message="Starting a systemd service..." - -# supervisorctl reload - -# sleep 30 - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8f93d8b..2aca68e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,7 +95,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" ynh_script_progression --message="Upgrading dependencies..." ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies -ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian/ $(lsb_release --codename --short) main contrib" --package=$contrib_dependencies --key="https://ftp-master.debian.org/keys/release-$(lsb_release --release --short).asc" +ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian/ $(lsb_release --codename --short) main contrib" --package="ttf-mscorefonts-installer" --key="https://ftp-master.debian.org/keys/release-$(lsb_release --release --short).asc" #================================================= # NGINX CONFIGURATION @@ -136,7 +136,7 @@ ynh_remove_extra_repo --name="$app" # backward compat # apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 # ynh_remove_app_dependencies -ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package=$extra_dependencies --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" +ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package="onlyoffice-documentserver" --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" #=================================================