From 4369c40793eb26dd552220133acb57998f474104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:10:27 +0100 Subject: [PATCH] fix --- conf/nginx.conf | 6 ++++-- scripts/install | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7854cab..f9431e9 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,7 @@ -location / { - proxy_pass http://localhost:__PORT__/; +#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 Host $host; diff --git a/scripts/install b/scripts/install index 3fb432e..1041919 100755 --- a/scripts/install +++ b/scripts/install @@ -33,13 +33,15 @@ ynh_secure_remove "$install_dir/server" #================================================= ynh_script_progression --message="Adding configuration file..." --weight=1 -ynh_add_config -t "server.yml" -d "$install_dir/server.yml" +ynh_add_config --template="server.yml" --destination="$install_dir/server.yml" #================================================= # SYSTEM CONFIGURATION #================================================= ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 +ynh_add_nginx_config + ynh_add_systemd_config yunohost service add $app --description="Open Source Push Notification Server" --log="/var/log/$app/$app.log"