diff --git a/conf/nginx.conf b/conf/nginx.conf index f4c59bf..7e82033 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,14 +5,12 @@ location / { index index.php; - try_files $uri $uri/ __PATH__/__PATH__/index.php?$query_string; + try_files $uri $uri/ index.php; - location ~ \.php$ { - if (!-e $request_filename) { - rewrite ^__PATH__/?(.*)$ __PATH__/index.php?/$1 last; - break; - } + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; @@ -28,7 +26,4 @@ location / { more_set_headers "Referrer-Policy: no-referrer"; more_set_headers "Feature-Policy: autoplay 'none'; camera 'none'; document-domain 'none'; encrypted-media 'none'; fullscreen 'self'; geolocation 'none'; microphone 'none'; midi 'none'; payment 'none'; vr 'none'"; more_set_headers "Vary: Accept-Encoding"; - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; } diff --git a/scripts/install b/scripts/install index 44d942c..bb38d35 100644 --- a/scripts/install +++ b/scripts/install @@ -131,12 +131,11 @@ ynh_install_composer --install_args="--no-dev" ynh_script_progression --message="Installing $app..." --weight=30 pushd "$final_path" - ynh_composer_exec --commands="install --prefer-dist --no-cache --no-progress --no-dev -a" - - #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH npm install --save https://github.com/foliojs/brotli.js/tarball/master ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile --prod ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run buildall + ynh_composer_exec --commands="install --prefer-dist --no-cache --no-progress --no-dev -a" + ynh_secure_remove node_modules ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean @@ -144,7 +143,7 @@ pushd "$final_path" ynh_exec_as $app php$phpversion bin/install start -q popd -ynh_script_progression --message="Configuring LDAP and emails..." --weight=2 +#ynh_script_progression --message="Configuring LDAP and emails..." --weight=2 #ynh_add_config --template="../conf/sql.template" --destination="../conf/sql" #ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name < ../conf/sql