From ca06ee4f07d3413ba0bd345aa9662e0db69a7678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Feb 2023 12:40:52 +0100 Subject: [PATCH] Fix --- conf/extra_php-fpm.conf | 4 ++-- conf/nginx_no_php.conf | 3 ++- conf/nginx_with_php.conf | 3 ++- scripts/actions/create_database | 2 +- scripts/actions/remove_database | 3 ++- scripts/config | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index a2e3d58..4af9c64 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -1,6 +1,6 @@ ; Additional php.ini defines, specific to this pool of workers. -php_value[upload_max_filesize] = 1G -php_value[post_max_size] = 1G +php_value[upload_max_filesize] = 500M +php_value[post_max_size] = 500M php_value[default_charset] = UTF-8 php_value[always_populate_raw_post_data] = -1 diff --git a/conf/nginx_no_php.conf b/conf/nginx_no_php.conf index 992aab7..a80930c 100644 --- a/conf/nginx_no_php.conf +++ b/conf/nginx_no_php.conf @@ -5,7 +5,7 @@ location __PATH__/ { alias __INSTALL_DIR__/www/; # Common parameter to increase upload size limit in conjunction with dedicated PHP-FPM file - #client_max_body_size 1G; + client_max_body_size 500M; # Default indexes and catch-all index index.html index.php; @@ -16,6 +16,7 @@ location __PATH__/ { log_not_found off; access_log off; } + location = __PATH__/robots.txt { allow all; log_not_found off; diff --git a/conf/nginx_with_php.conf b/conf/nginx_with_php.conf index 9a9ad34..7f5752e 100644 --- a/conf/nginx_with_php.conf +++ b/conf/nginx_with_php.conf @@ -5,7 +5,7 @@ location __PATH__/ { alias __INSTALL_DIR__/www/; # Common parameter to increase upload size limit in conjunction with dedicated PHP-FPM file - #client_max_body_size 1G; + client_max_body_size 500M; # Default indexes and catch-all index index.html index.php; @@ -16,6 +16,7 @@ location __PATH__/ { log_not_found off; access_log off; } + location = __PATH__/robots.txt { allow all; log_not_found off; diff --git a/scripts/actions/create_database b/scripts/actions/create_database index f8ddb6f..3013df6 100755 --- a/scripts/actions/create_database +++ b/scripts/actions/create_database @@ -46,7 +46,7 @@ ynh_script_progression --message="Creating a new database..." --weight=4 db_name=$(ynh_sanitize_dbid --db_name=$app) # Reuse the previous password if existing -db_pwd=$(grep "pass:" "$final_path/db_access.txt" | cut -d' ' -f2 2> /dev/null) +db_pwd=$(grep "pass:" "$install_dir/db_access.txt" | cut -d' ' -f2 2> /dev/null) ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd diff --git a/scripts/actions/remove_database b/scripts/actions/remove_database index d7c4477..5677093 100755 --- a/scripts/actions/remove_database +++ b/scripts/actions/remove_database @@ -38,7 +38,8 @@ fi ynh_script_progression --message="Removing the database..." --weight=9 db_name=$(ynh_app_setting_get --app=$app --key=db_name) -ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name +db_user=$db_name +ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name # Update the config of the app ynh_app_setting_set --app=$app --key=with_mysql --value=0 diff --git a/scripts/config b/scripts/config index 9039486..3f3d88c 100644 --- a/scripts/config +++ b/scripts/config @@ -15,7 +15,7 @@ ynh_abort_if_errors # RETRIEVE ARGUMENTS #================================================= -final_path=$(ynh_app_setting_get $app final_path) +install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path)