diff --git a/conf/nginx.conf b/conf/nginx.conf index cff467e..dcd6992 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { # Path to source alias __FINALPATH__/; diff --git a/scripts/install b/scripts/install index df4ccff..4194e6f 100755 --- a/scripts/install +++ b/scripts/install @@ -113,13 +113,10 @@ ynh_add_nginx_config ynh_script_progression --message="Adding a configuration file..." --weight=2 ynh_add_config --template="../conf/.env-sample" --destination="$final_path/.env" -#ynh_add_config --template="../conf/servers.json" --destination="$final_path/servers.json" chmod 400 "$final_path/.env" chown $app:$app "$final_path/.env" -#$final_path/bin/cli api-key:generate --domain-only=$domain - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 81da5fc..77ca61d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -24,7 +24,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -39,7 +39,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --time --weight=1 +ynh_script_progression --message="Validating restoration parameters..." --weight=1 test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " @@ -65,6 +65,14 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #=================================================