diff --git a/README.md b/README.md
index d94b535..bcd3367 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,73 @@
-[](https://dash.yunohost.org/appci/app/yourls)  
+# YOURLS for YunoHost
-
What is YOURLS?
-YOURLS stands for Your Own URL Shortener. It is a small set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or bitly).
+[](https://dash.yunohost.org/appci/app/yourls)  
+[](https://install-app.yunohost.org/?app=yourls)
-Running your own URL shortener is fun, geeky and useful: you own your data and don't depend on third party services. It's also a great way to add branding to your short URLs, instead of using the same public URL shortener everyone uses.
-For more information see:https://yourls.org/
-Github:https://github.com/YOURLS/YOURLS
-Version:1.7.6
+*[Lire ce readme en français.](./README_fr.md)*
+
+> *This package allows you to install Yourls quickly and simply on a YunoHost server.
+If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
+
+## Overview
+
+YOURLS stands for Your Own URL Shortener. It is a small set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or bitly).
+
+**Shipped version:** 1.7.9
+
+## Screenshots
+
+
+
+## Demo
+
+* [Official demo](Link to a demo site for this app.)
+
+
+## Configuration
+
+How to configure this app: From an admin panel, a plain file with SSH, or any other way.
+
+## Documentation
+
+ * Official documentation: Link to the official documentation of this app
+ * YunoHost documentation: If specific documentation is needed, feel free to contribute.
+
+## YunoHost specific features
+
+#### Multi-user support
+
+ * Are LDAP and HTTP auth supported?
+ * Can the app be used by multiple users?
+
+#### Supported architectures
+
+* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/yourls/)
+* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/yourls/)
+
+## Limitations
+
+* Any known limitations.
+
+## Additional information
+
+* Other info you would like to add about this app.
+
+## Links
+
+ * Report a bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues
+ * App website: https://yourls.org/
+ * Upstream app repository: https://github.com/YOURLS/YOURLS
+ * YunoHost website: https://yunohost.org/
+
+---
+
+## Developer info
+
+Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/yourls_ynh/tree/testing).
+
+To try the testing branch, please proceed like that.
+```
+sudo yunohost app install https://github.com/YunoHost-Apps/yourls_ynh/tree/testing --debug
+or
+sudo yunohost app upgrade yourls -u https://github.com/YunoHost-Apps/yourls_ynh/tree/testing --debug
+```
diff --git a/conf/config.php b/conf/config.php
index c363d3a..8009042 100644
--- a/conf/config.php
+++ b/conf/config.php
@@ -8,20 +8,20 @@
*/
/** MySQL database username */
-define( 'YOURLS_DB_USER', 'yunouser' );
+define( 'YOURLS_DB_USER', '__DB_NAME__' );
/** MySQL database password */
-define( 'YOURLS_DB_PASS', 'yunopass' );
+define( 'YOURLS_DB_PASS', '__DB_PASSWORD__' );
/** The name of the database for YOURLS */
-define( 'YOURLS_DB_NAME', 'yunobase' );
+define( 'YOURLS_DB_NAME', '__DB_NAME__' );
/** MySQL hostname.
** If using a non standard port, specify it like 'hostname:port', eg. 'localhost:9999' or '127.0.0.1:666' */
define( 'YOURLS_DB_HOST', 'localhost' );
/** MySQL tables prefix */
-define( 'YOURLS_DB_PREFIX', 'yourls_' );
+define( 'YOURLS_DB_PREFIX', '__DB_NAME___' );
/*
** Site options
@@ -29,7 +29,7 @@ define( 'YOURLS_DB_PREFIX', 'yourls_' );
/** YOURLS installation URL -- all lowercase and with no trailing slash.
** If you define it to "http://site.com", don't use "http://www.site.com" in your browser (and vice-versa) */
-define( 'YOURLS_SITE', 'https://yunodomain_yourlspath' );
+define( 'YOURLS_SITE', 'https://__DOMAIN____PATH__' );
/** Timezone GMT offset */
define( 'YOURLS_HOURS_OFFSET', 0 );
diff --git a/conf/nginx.conf b/conf/nginx.conf
index 9ee15d3..ae41dca 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -1,18 +1,19 @@
-location __PATH__ {
+#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
+location __PATH__/ {
+
alias __FINALPATH__/;
+ # Force usage of https
+ if ($scheme = http) {
+ rewrite ^ https://$server_name$request_uri? permanent;
+ }
- if ($scheme = http) {
- rewrite ^ https://$server_name$request_uri? permanent;
- }
-
- try_files $uri $uri/ __PATHTOCHANGE__/yourls-loader.php;
+ try_files $uri $uri/ __FINALPATH__/yourls-loader.php;
index index.php index.html index.htm;
-
- location ~ [^/]\.php(/|$) {
+ location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
@@ -22,7 +23,6 @@ location __PATH__ {
fastcgi_param SCRIPT_FILENAME $request_filename;
}
-
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
diff --git a/scripts/install b/scripts/install
index bef7138..ba8c290 100644
--- a/scripts/install
+++ b/scripts/install
@@ -34,10 +34,8 @@ app=$YNH_APP_INSTANCE_NAME
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
-ynh_script_progression --message="Validating installation parameters..." --time --weight=1
+ynh_script_progression --message="Validating installation parameters..." --weight=1
-### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
-### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app"
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
@@ -47,7 +45,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
-ynh_script_progression --message="Storing installation settings..." --time --weight=1
+ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url