ruTorrent is not displaying correctly after adding PATH rule

Hi,
I'm trying to setup rutorrent to work with traefik on a specified path
first of all my docker-compose setup:

version: '3.5'

services:

  traefik:
    container_name: traefik
    image: traefik:v2.0.1
    command:
      - "--log.level=DEBUG"
      - "--api"
      - "--providers.docker=true"
      - "--entrypoints.web.address=:80"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    labels:
      - "traefik.http.routers.traefik.rule=Host(`traefik.docker.localhost`)"
      - "traefik.http.routers.traefik.service=api@internal"
      - "traefik.http.routers.traefik.entrypoints=web"
    networks:
      gateway: {}
  
  vpn:
    image: dperson/openvpn-client:armhf
    container_name: vpn
    command: "-r 172.17.0.1"
    volumes:
      - "/apps/vpn:/vpn"
    ports:
      - "8080:80"
    devices:
      - "/dev/net/tun"
    dns:
      - 1.1.1.1
    cap_add:
      - NET_ADMIN
    networks:
      gateway: {}
      
  rutorrent:
    image: linuxserver/rutorrent
    container_name: rutorrent
    network_mode: container:vpn
    depends_on: 
      - vpn
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
       - /apps/rutorrent/config:/config
       - /apps/rutorrent/downloads:/downloads
    network_mode: "service:vpn"
    labels:
      - "traefik.http.routers.rutorrent.rule=Host(`zpi.home`)"
      - "traefik.http.routers.rutorrent.middlewares=rutorrent@docker"
      - "traefik.http.routers.rutorrent.entrypoints=web"
      - "traefik.http.middlewares.rutorrent.stripprefix.prefixes=/rutorrent"
      - "traefik.http.services.rutorrent.loadbalancer.server.port=80"

networks:
  gateway:
    ipam:
      driver: default

With that configuration rutorrent is working perfectly on both of zpi.home and zpi.home/rutorrent but I don't want to traefik to route the request from zpi.home to rutorrent so I added a && Path(/rutorrent) to the rule, but when I add that, only a blank page with few elements of rutorrent is displayed.
Thx :smiley:
Is that related to a path problem ? Which rutorrent is trying to respond but can't because of the addition of "Path" ?
The ideal solution is to let the default configuration to rutorrent.

Well ok then, but why is rutorrent working properly on /rutorrent when I delete the Path(/rutorrent) and keep the stripprefix then ? because traefik is ""redirecting"" the /rutorrent on the / ?? So stripprefix isn't effective when a path rule is set or because traefik is only listening on /rutorrent and not / ?
Don't know if I'm clear ^^

Take out your middleware if <rutorrenthost>/rutorrent works. The stripprefix is used to transform the request sent inside to remove the prefix which is what you do not want.

No because if I remove the middleware, ruTorrent is trying to answer to zpi.home/rutorrent ,and it can't because it's supposed to listen on / not /rutorrent, that's why I added this middleware to remove the /rutorrent, which is working properly, but as soon I'm trying to remove the / route with the Path rule, rutorrent just displays nothing.

So I think the only way to get that working is to edit the configuration of rutorrent to get it working on /rutorrent, so I'll try removing the middleware and the stripprefix add the Path rule and edit one line in rutorrent's nginx

$topDirectory = '/';    <-- try changing to /rutorrent/ 

Nope I tried the /rutorrent, it doesn't work either.
Also tried that, but same thing after adding the Path /rutorrent.
But I get a Permission Denied when I'm trying to load zpi.home, and I can access ruTorrent on /rutorrent so that's a start ^^

In the site-conf of nginx

upstream backendrtorrent {
    server unix:/run/php/.rtorrent.sock;
}

server {
    listen 80 default_server;

    listen 443 ssl;

    root /app/rutorrent; <-------------------------- to /app
    index index.php index.html index.htm;

    server_name _;

    ssl_certificate /config/keys/cert.crt;
    ssl_certificate_key /config/keys/cert.key;

    client_max_body_size 0;

    location / {
        location ~ .php$ {
            fastcgi_split_path_info ^(.+\.php)(.*)$;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include /etc/nginx/fastcgi_params;
        }
    }

    location /RPC2 {
        access_log /config/log/nginx/rutorrent.rpc2.access.log;
        error_log /config/log/nginx/rutorrent.rpc2.error.log;
        include /etc/nginx/scgi_params;
        scgi_pass backendrtorrent;
    }
}