diff --git a/conf/nginx.conf b/conf/nginx.conf index 0ab9560..2e4bbf2 100644 --- 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__/public/ ; @@ -10,7 +11,8 @@ location / { index index.php; - try_files $uri __PATH__/index.php; + #try_files $uri __PATH__/index.php; + try_files $uri __PATH__/index.php$is_args$query_string; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; diff --git a/scripts/upgrade b/scripts/upgrade index 3a27844..d485a90 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) -phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -82,13 +82,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chown -R $app: $final_path - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -97,6 +90,13 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated php-fpm config ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chown -R $app: $final_path + #================================================= # MODIFY A CONFIG FILE #=================================================