From beb6c7e39976a8a04b7c1eb8b9301c922511f51d Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Thu, 17 Aug 2023 16:20:51 +0200 Subject: [PATCH] Update nginx config Fix config function --- conf/nginx.conf | 3 ++- scripts/config | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index e522e75..5971601 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,7 +6,8 @@ location __PATH__/ { # Default indexes and catch-all index index.html index.php; - try_files $uri $uri/ __PATH__/index.php?$args =404; + # try_files $uri $uri/ __PATH__/index.php?$args =404; + try_files $uri $uri/ __PATH__/index.php?$args; # Prevent useless logs location = __PATH__/favicon.ico { diff --git a/scripts/config b/scripts/config index baf65b7..43d19bc 100644 --- a/scripts/config +++ b/scripts/config @@ -148,10 +148,13 @@ ynh_app_config_apply() { ynh_system_user_del_group --username=$app --groups="sftp.app" fi - if [ "${changed[$custom_error_file]}" == "true" ] + if [ "${changed[custom_error_file]}" == "true" ] then CUSTOM_ERROR_FILE=$custom_error_file ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf" + else + # TODO + echo remove config file fi if [ "$phpversion" != "none" ]