From d123e8a6d6306cacfe5fabf05e62e94514f0019c Mon Sep 17 00:00:00 2001 From: Rodolphe Robles Date: Tue, 7 Apr 2020 19:19:15 +0200 Subject: [PATCH] try to make possible install on root path and change url from or to root path --- conf/nginx.conf | 2 +- scripts/change_url | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7c4f09a..265611a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,7 +8,7 @@ location __PATH__ { } # Example PHP configuration (remove if not used) - index index.php /_route.php; + # index index.php /_route.php; # Common parameter to increase upload size limit in conjuction with dedicated php-fpm file #client_max_body_size 50M; diff --git a/scripts/change_url b/scripts/change_url index c8c18e1..96e3e4a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -68,20 +68,7 @@ then # Calculate and store the nginx config file checksum ynh_store_file_checksum "$nginx_conf_path" # ynh_replace_string - if $old_url != / - then - ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" - else - ynh_replace_string --match_string="const WWW_URI = '$old_path';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" - fi - - if $new_url != / - then - ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" - else - ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path';" --target_file="$final_path/config.local.php" - fi - + ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" fi