From ff7199088a6f4bfa845027fa9863ec6e043d748d Mon Sep 17 00:00:00 2001 From: rungeard Date: Wed, 12 May 2021 16:36:42 +0200 Subject: [PATCH] =?UTF-8?q?test=20changement=20param=C3=A8tre=20MySQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/nginx.conf | 2 +- scripts/install | 9 +++++---- scripts/restore | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 37de41d..676fefb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -15,7 +15,7 @@ location __PATH__/ { # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file #client_max_body_size 50M; - try_files $uri $uri/ index.php; + try_files $uri $uri/ /index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; diff --git a/scripts/install b/scripts/install index b1b897d..493f960 100755 --- a/scripts/install +++ b/scripts/install @@ -162,10 +162,10 @@ ynh_script_progression --message="Configuring LibreSpeed..." rc_conf="$final_path/results/telemetry_settings.php" ynh_replace_string --match_string="stats_password = 'PASSWORD'" --replace_string="stats_password = '$password'" --target_file="$rc_conf" -ynh_replace_string --match_string="USERNAME" --replace_string="$db_user" --target_file="$rc_conf" +ynh_replace_string --match_string="MySql_username = 'USERNAME'" --replace_string="MySql_username = '$db_user'" --target_file="$rc_conf" ynh_replace_string --match_string="MySql_password = 'PASSWORD'" --replace_string="MySql_password = '$db_pwd'" --target_file="$rc_conf" -ynh_replace_string --match_string="DB_NAME" --replace_string="$db_name" --target_file="$rc_conf" -ynh_replace_string --match_string="DB_HOSTNAME" --replace_string="localhost" --target_file="$rc_conf" +ynh_replace_string --match_string="MySql_databasename = 'DB_NAME'" --replace_string="MySql_databasename = '$db_name'" --target_file="$rc_conf" +ynh_replace_string --match_string="MySql_hostname = 'DB_HOSTNAME'" --replace_string="MySql_hostname = 'localhost'" --target_file="$rc_conf" ynh_replace_string --match_string="enable_id_obfuscation = false" --replace_string="enable_id_obfuscation = true" --target_file="$rc_conf" #================================================= @@ -175,9 +175,10 @@ ynh_replace_string --match_string="enable_id_obfuscation = false" --replace_stri #================================================= # Set permissions to app files +chmod 750 "$final_path" chown -R $app:www-data $final_path chmod o-rwx $final_path -#chmod 750 "$final_path" + #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 64d2c9b..3a46f5f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -75,7 +75,7 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -mv $final_path/'example-singleServer-full.html' "$final_path/index.html" +#mv $final_path/'example-singleServer-full.html' "$final_path/index.html" #================================================= # RESTORE THE PHP-FPM CONFIGURATION