From 2284e264ef5ed627a7f3e6b7758911b7aaa3e4fe Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 13 Apr 2022 13:56:33 +0200 Subject: [PATCH] Set sub path --- conf/nginx.conf | 3 ++- manifest.json | 6 ++++++ scripts/install | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 748b3cb..0d5ce06 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__/; proxy_redirect off; diff --git a/manifest.json b/manifest.json index 961f9cb..7620803 100644 --- a/manifest.json +++ b/manifest.json @@ -32,6 +32,12 @@ "name": "domain", "type": "domain" }, + { + "name": "path", + "type": "path", + "example": "/redmine", + "default": "/redmine" + }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index 3694662..3faf0dc 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,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 app=$YNH_APP_INSTANCE_NAME