diff --git a/README.md b/README.md index df564bc..028ac1f 100644 --- a/README.md +++ b/README.md @@ -15,15 +15,15 @@ sudo yunohost app install https://github.com/duniter/duniter_ynh The package is **in progress**. Currently, it: -- Install Duniter ≥ 0.20.0 +- Install Duniter ≥ 0.22.0a7 - Configure - Synchronize - Start Extra features: -- Will come soon: graphical interface to manage the node. -- Path access through a proxy_pass instead through the port cause it failed. +- Graphical interface to manage the node. +- Path access on `https://duniter.domain.tld/api` to the node API and not through the port because it fail. - Duniter logs are displayed on the YunoHost admin interface ## License diff --git a/conf/nginx.conf b/conf/nginx.conf index d4eb7f9..a226ce6 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,10 @@ -location YNH_EXAMPLE_PATH/ { +location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NgninX-Porxy true; - proxy_pass http://localhost:9220/; + proxy_pass http://localhost:9220; proxy_redirect off; # Socket.io support @@ -12,7 +12,7 @@ location YNH_EXAMPLE_PATH/ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - location ^~ YNH_EXAMPLE_PATH/api/ { + location ^~ /api/ { proxy_pass http://YNH_EXAMPLE_DOMAIN:YNH_EXAMPLE_PORT/; } diff --git a/conf/upstream_version b/conf/upstream_version index 3b8e435..c9da239 100644 --- a/conf/upstream_version +++ b/conf/upstream_version @@ -1 +1 @@ -v0.21.3 +v0.22.0a7 diff --git a/manifest.json b/manifest.json index 643dd32..695a385 100644 --- a/manifest.json +++ b/manifest.json @@ -35,11 +35,11 @@ "name": "path", "type": "path", "ask": { - "en": "Path on which install the proxy", - "fr": "Chemin sur lequel ajouter le proxy" + "en": "Path on which install the web admin (installable only on root path)", + "fr": "Chemin sur lequel ajouter l’administration web (installable uniquement sur la racine)" }, - "example": "/duniter", - "default": "/duniter" + "example": "/", + "default": "/" }, { "name": "port", diff --git a/scripts/install b/scripts/install index 813034b..b76daa7 100755 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,11 @@ source /usr/share/yunohost/helpers sudo yunohost app checkurl "${domain}${path}" -a "$app" \ || ynh_die "Path not available: ${domain}${path}" +# Check path is root +if [[ $path != '/' ]]; then + ynh_die "Web admin can only be installed on root path for now" +fi + # Check port availability sudo yunohost app checkport $port if [[ ! $? -eq 0 ]]; then @@ -86,7 +91,7 @@ ynh_app_setting_set "$app" unprotected_uris "/" # "api/" # Configure Nginx nginx_conf="../conf/nginx.conf" -sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf +#sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf sudo sed -i "s@YNH_EXAMPLE_PORT@$port@" $nginx_conf sudo sed -i "s@YNH_EXAMPLE_DOMAIN@$domain@" $nginx_conf sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf