From ef7ead286d551220c95a56333b0aac934f0cb318 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 20 Aug 2021 09:40:35 +0200 Subject: [PATCH] Add path --- check_process | 4 ++-- conf/nginx.conf | 7 ++++--- manifest.json | 8 +++++++- scripts/install | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/check_process b/check_process index f048339..286ba0e 100644 --- a/check_process +++ b/check_process @@ -7,7 +7,7 @@ password="password" ; Checks pkg_linter=1 - setup_sub_dir=0 + setup_sub_dir=1 setup_root=1 setup_nourl=0 setup_private=1 @@ -15,7 +15,7 @@ upgrade=1 #upgrade=1 from_commit= backup_restore=1 - multi_instance=0 + multi_instance=1 change_url=1 ;;; Options Email= diff --git a/conf/nginx.conf b/conf/nginx.conf index 665ba1c..42be42e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { # Path to source alias __FINALPATH__/ ; @@ -8,7 +9,7 @@ location / { rewrite ^ https://$server_name$request_uri? permanent; } - try_files $uri $uri/ /; + try_files $uri $uri/ __PATH__/__PATH__/index.php?$query_string; index index.html index.htm; @@ -16,7 +17,7 @@ location / { include conf.d/yunohost_panel.conf.inc; } -location ~* ^/(api|dav|\.well-known)/ { +location __PATH__/(api|dav|\.well-known)/ { proxy_pass http://127.0.0.1:__PORT__; client_max_body_size 20M; } diff --git a/manifest.json b/manifest.json index ef639f2..127633a 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "requirements": { "yunohost": ">= 4.2.4" }, - "multi_instance": false, + "multi_instance": true, "services": [ "nginx" ], @@ -33,6 +33,12 @@ "type": "domain", "example": "domain.org" }, + { + "name": "path", + "type": "path", + "example": "/vikunja", + "default": "/vikunja" + }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index 1e035bd..56559c7 100644 --- a/scripts/install +++ b/scripts/install @@ -21,7 +21,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url="/" +path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC timezone="$(cat /etc/timezone)" architecture=$(ynh_detect_arch)