From 4efd37ab8f840f48654420b97bc7bd4cc5da974a Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Thu, 4 Jun 2020 00:06:50 +0200 Subject: [PATCH] change syntax nginx_conf --- conf/nginx.conf | 5 +++-- scripts/install | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index f65be88..508fc0a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,8 @@ -location YNH_WWW_PATH { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { # Path to source - alias YNH_WWW_ALIAS ; + alias __FINALPATH__/ ; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/scripts/install b/scripts/install index f0b6fd0..0a0401a 100755 --- a/scripts/install +++ b/scripts/install @@ -82,9 +82,6 @@ ynh_script_progression --message="Configuring nginx web server..." --time --weig # Create a dedicated nginx config ynh_add_nginx_config -# Modify Nginx configuration file and copy it to Nginx conf directory -ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$path_url" --target_file="$final_path/nginx.conf" -ynh_replace_string --match_string='YNH_WWW_ALIAS' --replace_string='$final_path' --target_file="$final_path/nginx.conf" if [ "$path_url" != "/" ] then