Nginx frontend + different servers Nextcloud 'n' Collabora on apache2 backend

How I can make this sheme?
Now I have:

  1. nginx ssl frontend with two domain (domain01, domain02);

  2. apache2 backend with nextcloud work on this two domain with subfolder (domain01/cloud/, domain02/cloud/)
    I need:

  3. make server on apache2 backend with coolabora online for this two domain with subfolder (domain01/collabora/, domain02/collabora/)

  4. connect it to nginx proxy with ssl and add to nextcloud collabora addon.
    Tried:

    sudo apt-get install docker.io
    sudo systemctl start docker
    sudo systemctl enable docker

    sudo docker pull collabora/code
    sudo docker run -t -d -p 127.0.0.1:9980:9980 -e ‘username=admin’ -e ‘password=12345678’ -e ‘domain=domain01\.ru|www\.domain01\.ru|domain02\.ru|www\.domain02\.ru’ --restart always --cap-add MKNOD collabora/code


<VirtualHost *:80>
  AllowEncodedSlashes NoDecode
  
  SSLProxyEngine On
  SSLProxyVerify None
  SSLProxyCheckPeerCN Off
  SSLProxyCheckPeerName Off

  ProxyPreserveHost On

  ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
  ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet

  ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
  ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery

  ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon

  ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws

  ProxyPass /lool https://127.0.0.1:9980/lool
  ProxyPassReverse /lool https://127.0.0.1:9980/lool
</VirtualHost>

upstream http_collabora {
  server 192.168.1.102:80;
  keepalive 32;
}

server {

  listen 443 ssl http2;
  charset utf-8;

  * * * etc...

  ssl on;

  * * * etc...
  
  location ^~ /loleaflet {
    proxy_pass http://http_collabora;
    proxy_set_header Host $http_host;
  }

  location ^~ /hosting/discovery {
    proxy_pass http://http_collabora;
    proxy_set_header Host $http_host;
  }

  location ~ /lool/(.*)/ws$ {
    proxy_pass http://http_collabora;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
    proxy_read_timeout 36000s;
  }

  location ^~ /lool/adminws {
    proxy_pass http://http_collabora;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
    proxy_read_timeout 36000s;
  }

  location ^~ /lool {
    proxy_pass http://http_collabora;
    proxy_set_header Host $http_host;
  }
}

This work, but not all…

ok. collabora online have hard links on static resources into html, and make access for it imposible.
only /loleaflet, but no /collabora/loleaflet
only /hosting/discovery, but no /collabora/hosting/discovery
it’s a bad, it’s a very BAD!