From c23b5e00b3eb26ff24367f664ba2f69d90c7642e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Feb 2021 18:56:52 +0100 Subject: [PATCH] fix --- conf/nginx.conf | 2 +- conf/systemd.service | 2 -- scripts/install | 4 +++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4390138..0f87f4b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,5 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location / { # Force usage of https if ($scheme = http) { diff --git a/conf/systemd.service b/conf/systemd.service index 22c4f63..cfb9b2b 100755 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -14,5 +14,3 @@ Environment=NODE_ENV=production [Install] WantedBy=multi-user.target - - diff --git a/scripts/install b/scripts/install index 6d0a975..e57ca19 100755 --- a/scripts/install +++ b/scripts/install @@ -98,7 +98,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path ynh_script_progression --message="tiddlywiki..." --weight=2 pushd $final_path - $ynh_node $final_path/tiddlywiki monwiki --init server + $nodejs_path/node $final_path/tiddlywiki monwiki --init server popd #================================================= @@ -106,6 +106,8 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 +ynh_replace_string --match_string="__NODEJS_PATH__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__port__" --replace_string="$port" --target_file="../conf/systemd.service" ynh_add_systemd_config #=================================================