From 792be98ab0fdff6fea2b0fa815d97480b8df5f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 22 Mar 2024 22:21:58 +0100 Subject: [PATCH] Fix nginx --- scripts/_common.sh | 3 ++- scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4bce3fb..3f4d09d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,8 +9,9 @@ #================================================= _ci_fix_nginx() { + # Ofbiz returns a 404 on its root, so let's redirect to another path also served if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then - echo 'rewrite ^/$ /catalog/;' >> "/etc/nginx/conf.d/${domain}.d/$app.conf" + echo 'rewrite ^/$ /catalog/;' >> "../conf/nginx.conf" fi } diff --git a/scripts/install b/scripts/install index 3f4a009..56f9085 100755 --- a/scripts/install +++ b/scripts/install @@ -67,8 +67,8 @@ popd ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated NGINX config -ynh_add_nginx_config _ci_fix_nginx +ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index 3b35296..d39b823 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -69,8 +69,8 @@ ynh_add_config --template="build.gradle" --destination="$install_dir/build.gradl ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated NGINX config -ynh_add_nginx_config _ci_fix_nginx +ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config