diff --git a/scripts/install b/scripts/install index 4fc7964..3fb999f 100644 --- a/scripts/install +++ b/scripts/install @@ -61,13 +61,8 @@ ln -s "$data_path/thumbs" "$final_path/thumbs" myynh_set_permissions # configure nginx settings -if test -n "${path_url:-}"; then - if [ "${path_url:-}" != "/" ]; then - ynh_replace_string "^#sub_path_only " "" "../conf/nginx.conf" - ynh_replace_string "__PATH__" "$path_url" "../conf/nginx.conf" - else - ynh_replace_string "location\( \(=\|~\|~\*\|\^~\)\)\? __PATH__/" "location\1 $path_url" "../conf/nginx.conf" - fi +if [ "$path_url" != "/" ]; then + ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" fi ynh_add_nginx_config diff --git a/scripts/upgrade b/scripts/upgrade index 0108162..48a4ece 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,6 +47,9 @@ rm -R "$TMPDIR" myynh_set_permissions # configure nginx settings +if [ "$path_url" != "/" ]; then + ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" +fi ynh_add_nginx_config # copy and set php-fpm configuration