From 2a90eb770d6f5fbb6a9c50f14f2ae4a1eff0721f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 14 Oct 2020 14:13:28 +0200 Subject: [PATCH] fix --- conf/nginx.conf | 11 ++++++++--- scripts/install | 10 +++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 500ebf8..37de41d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,19 +9,24 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } +### Example PHP configuration (remove it if not used) index index.php; + # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file + #client_max_body_size 50M; + try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm.sock; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } +### End of PHP configuration part # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/scripts/install b/scripts/install index f4209bd..2ae2a5f 100644 --- a/scripts/install +++ b/scripts/install @@ -66,6 +66,14 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --time --weight=1 + +# Create a system user +ynh_system_user_create --username=$app + #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -80,7 +88,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # Set permissions to app files -chown -R root: $final_path +chown -R $app: $final_path #================================================= # SETUP SSOWAT