diff --git a/conf/nginx.conf b/conf/nginx.conf index cfdefca..85c32c3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,6 +4,9 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; + client_max_body_size 100M; + autoindex off; + # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; diff --git a/scripts/_common.sh b/scripts/_common.sh index d7614e9..3a32823 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,8 @@ YNH_PHP_VERSION="7.3" +extra_php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-soap php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 758af0c..c6a2a93 100644 --- a/scripts/install +++ b/scripts/install @@ -80,7 +80,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -88,7 +88,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # Set permissions to app files -chown -R $app: $final_path +chown -R www-data:www-data $final_path +chmod -R 755 $final_path #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index a0de85a..85a6cf7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -67,7 +67,8 @@ ynh_system_user_create --username=$app #================================================= # Restore permissions on app files -chown -R $app: $final_path +chown -R www-data:www-data $final_path +chmod -R 755 $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 77c47f1..53f1270 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,15 +95,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Upgrading PHP-FPM configuration..." --time --weight=1 # Create a dedicated php-fpm config -ynh_add_fpm_config - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # GENERIC FINALIZATION @@ -112,7 +104,8 @@ ynh_add_systemd_config --phpversion=$YNH_PHP_VERSION #================================================= # Set permissions on app files -chown -R $app: $final_path +chown -R www-data:www-data $final_path +chmod -R 755 $final_path #================================================= # INTEGRATE SERVICE IN YUNOHOST