1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/librespeed_ynh.git synced 2024-09-03 19:36:23 +02:00

change max post size

This commit is contained in:
rungeard 2021-05-13 11:34:00 +02:00
parent b68c5c88b0
commit 69e0c3d6c3
4 changed files with 13 additions and 12 deletions

View file

@ -13,7 +13,7 @@ location __PATH__/ {
index example-singleServer-full.html index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
client_max_body_size 50M;
client_max_body_size 500M;
try_files $uri $uri/ /index.php;
location ~ [^/]\.php(/|$) {

View file

@ -419,8 +419,8 @@ chdir = __FINALPATH__
;php_admin_value[memory_limit] = 32M
; Common values to change to increase file upload limit
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M
php_admin_value[upload_max_filesize] = 500M
php_admin_value[post_max_size] = 500M
; php_admin_flag[mail.add_x_header] = Off
; Other common parameters

View file

@ -172,6 +172,7 @@ ynh_replace_string --match_string="MySql_databasename = 'DB_NAME'" --replace_str
ynh_replace_string --match_string="MySql_hostname = 'DB_HOSTNAME'" --replace_string="MySql_hostname = 'localhost'" --target_file="$conf_telemetry"
ynh_replace_string --match_string='<a href="mailto:PUT@YOUR_EMAIL.HERE">TO BE FILLED BY DEVELOPER</a>.' --replace_string='<a href="mailto:'$mail'">'$mail'</a>.' --target_file="$conf_index"
ynh_replace_string --match_string='LibreSpeed Example' --replace_string='LibreSpeed YunoHost' --target_file="$conf_index"
#=================================================
# GENERIC FINALIZATION

View file

@ -110,8 +110,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
mv $final_path/'example-singleServer-full.html' "$final_path/index.html"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -142,14 +140,16 @@ then
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
rc_conf="$final_path/results/telemetry_settings.php"
conf_telemetry="$final_path/results/telemetry_settings.php"
conf_index="$final_path/example-singleServer-full.html"
ynh_replace_string --match_string="stats_password = 'PASSWORD'" --replace_string="stats_password = '$password'" --target_file="$rc_conf"
ynh_replace_string --match_string="USERNAME" --replace_string="$db_user" --target_file="$rc_conf"
ynh_replace_string --match_string="MySql_password = 'PASSWORD'" --replace_string="MySql_password = '$db_pwd'" --target_file="$rc_conf"
ynh_replace_string --match_string="DB_NAME" --replace_string="$db_name" --target_file="$rc_conf"
ynh_replace_string --match_string="DB_HOSTNAME" --replace_string="localhost" --target_file="$rc_conf"
ynh_replace_string --match_string="enable_id_obfuscation = false" --replace_string="enable_id_obfuscation = true" --target_file="$rc_conf"
ynh_replace_string --match_string="stats_password = 'PASSWORD'" --replace_string="stats_password = '$password'" --target_file="$conf_telemetry"
ynh_replace_string --match_string="MySql_username = 'USERNAME'" --replace_string="MySql_username = '$db_user'" --target_file="$conf_telemetry"
ynh_replace_string --match_string="MySql_password = 'PASSWORD'" --replace_string="MySql_password = '$db_pwd'" --target_file="$conf_telemetry"
ynh_replace_string --match_string="MySql_databasename = 'DB_NAME'" --replace_string="MySql_databasename = '$db_name'" --target_file="$conf_telemetry"
ynh_replace_string --match_string="MySql_hostname = 'DB_HOSTNAME'" --replace_string="MySql_hostname = 'localhost'" --target_file="$conf_telemetry"
ynh_replace_string --match_string='<a href="mailto:PUT@YOUR_EMAIL.HERE">TO BE FILLED BY DEVELOPER</a>.' --replace_string='<a href="mailto:'$mail'">'$mail'</a>.' --target_file="$conf_index"
fi