diff --git a/conf/nginx.conf b/conf/nginx.conf index 77b72b2..7a4b36a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,18 +1,19 @@ - location / { - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } +location / { + # Force usage of https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } - # Standard nginx configuration - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $http_host; + # Standard nginx configuration + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; - proxy_pass http://localhost:__PORT__; + proxy_pass http://localhost:__PORT__; - client_max_body_size 16m; + client_max_body_size 16m; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; - } + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; +} diff --git a/scripts/install b/scripts/install index 7054b60..d05a4a4 100644 --- a/scripts/install +++ b/scripts/install @@ -125,8 +125,6 @@ ynh_setup_source --dest_dir="$final_path/$app" #================================================= ynh_print_info --message="Configuring nginx web server..." -### `ynh_add_nginx_config` will use the file conf/nginx.conf - # Create a dedicated nginx config ynh_add_nginx_config diff --git a/scripts/restore b/scripts/restore index f5710fe..97b3220 100644 --- a/scripts/restore +++ b/scripts/restore @@ -52,6 +52,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_print_info --message="Restoring the nginx configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 8ce3564..92df5c9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,6 +34,7 @@ admin_email=$(ynh_app_setting_get --app=$app --key=admin_email) #================================================= # CHECK VERSION #================================================= +ynh_print_info --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -190,8 +191,8 @@ chown -R "$app":"$app" "$final_path" pushd $final_path/$app/js ynh_use_nodejs - sudo -u $app env PATH=$PATH npm install - sudo -u $app env PATH=$PATH npm run build + sudo -u $app env PATH=$PATH yarn install + sudo -u $app env PATH=$PATH yarn run build popd pushd $final_path/$app