diff --git a/conf/nginx.conf b/conf/nginx.conf index e68d709..d50d905 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location ^~ __PATH__/ { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__/; proxy_redirect off; diff --git a/scripts/install b/scripts/install index 9802cfd..e3eb573 100644 --- a/scripts/install +++ b/scripts/install @@ -126,8 +126,7 @@ chown -R $app:www-data "$data_path" #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" - +env_path="$PATH" ynh_add_systemd_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8d35abc..546d263 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,8 +123,7 @@ chown -R $app: "$final_path" #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=2 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" - +env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config