Can't find the directory "/hosting/discovery"

dear guys,

i can’t find my directory “/hosting/discovery” for reverse proxy :frowning: or can you help me understanding the meaning all the reverse proxy config for integrating collabora docker container or you have the refrence for the function all the directory in collabora/code container?

here is the command i use:

root@Aris-Intrn:/var/lib/docker/aufs/mnt/129617cf6d8c14268d32e64c745e5b0febcac6ab54c71e9dbb1e113305c89dac# find -name "*hosting"
root@Aris-Intrn:/var/lib/docker/aufs/mnt/129617cf6d8c14268d32e64c745e5b0febcac6ab54c71e9dbb1e113305c89dac#

did i do something wrong? please i need anyone help :slight_smile:

note: sorry for my bad english hehehe :wink:

“/hosting/discovery” is not a directory on the file system. It is part of an URL, the WOPI discovery URL. loolwsd serves /usr/share/loolwsd/discovery.xml under this URL.

Hello,

I was having same problem few days ago. This post: [Collabora] Configuration with docker-compose was very useful.

If you don’t want to configure all the reverse proxy like me, use these two containers:

My configuration: (It’s better to use docker compose)

I don’t understand all the things, but it works.

At first, run proxy:

nginx-proxy

docker run -d \
    --restart always \
    --name nginx-proxy \
    -v /srv/certs:/etc/nginx/certs:ro \
    -v /etc/nginx/vhost.d \
    -v /usr/share/nginx/html \
    -v /var/run/docker.sock:/tmp/docker.sock:ro \
    -p 80:80 \
    -p 443:443 \
    jwilder/nginx-proxy

Next, run container for Let’s Encrypt:

letsencrypt-nginx-proxy-companion

docker run -d \
    --restart always \
    --name nginx-proxy-letsencrypt \
    -v /srv/certs:/etc/nginx/certs:rw \
    --volumes-from nginx-proxy \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    jrcs/letsencrypt-nginx-proxy-companion

If you now run container, which has exposed port, it automaticaly redirect the traffic to container and generate certificate for https. All you need is specify some environment variables:

  • VIRTUAL_HOST for nginx-proxy
  • LETSENCRYPT_HOST and LETSENCRYPT_EMAIL for Let’s Encrypt

You don’t need to publish ports with docker run, port 80 and 443 is bind to nginx-proxy, forwarding is done localy.

For this example, nextcloud is on nc.domain.com and colabora on office.domain.com, but you can setup your own. I’m using wonderfall/nextcloud image, but you can use another.

nextcloud

docker run -d \
    --restart always \
    --name nc \
    --hostname nc.domain.com \
    -v /srv/data/nc/data:/data \
    -v /srv/data/nc/config:/config \
    --env VIRTUAL_HOST=nc.domain.com \
    --env LETSENCRYPT_HOST=nc.domain.com \
    --env LETSENCRYPT_EMAIL=a@b.c \
    wonderfall/nextcloud:daily

And finally, the collabora container:

code

docker run -t -d \
        --name nc-code \
        --hostname office.domain.com \
        --env VIRTUAL_HOST=office.domain.com \
        --env LETSENCRYPT_HOST=office.domain.com \
        --env LETSENCRYPT_EMAIL=a@b.c \
        --env VIRTUAL_PORT=9980 \
        --env VIRTUAL_PROTO=https \
        --env DOMAIN='nc\\.domain\\.com' \
        --restart always \
        --cap-add MKNOD \
        --expose 9980 \
        collabora/code

Now you only activate collabora connector app in nextcloud and in administraction choose https://office.domain.com as a collabora server.

Maybe it will be useful for you.

thankss… but can you tell me how to understand this reverse proxy configure or you have the refrence for me how to read this configure :slight_smile:

 #Encoded slashes need to be allowed
 AllowEncodedSlashes On

 #Container uses a unique non-signed certificate
 SSLProxyEngine On
 SSLProxyVerify None
 SSLProxyCheckPeerCN Off
 SSLProxyCheckPeerName Off

 # keep the host
 ProxyPreserveHost On

 # static html, js, images, etc. served from loolwsd
 # loleaflet is the client part of LibreOffice Online
 ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
 ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet

 # WOPI discovery URL
 ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
 ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery
  
 # Main websocket
 ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws

 # Admin Console websocket
 ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws

 # Download as, Fullscreen presentation and Image upload operations
 ProxyPass /lool https://127.0.0.1:9980/lool
 ProxyPassReverse /lool https://127.0.0.1:9980/lool

thanks for the refrence for using nginx, i want to try using apache first and then if apache success i will try using nginx :smiley:

btw thanks

It’s OK…

I could not find any helpful information about proxy as well, nginx-proxy solved the problem for me and I stopped trying to setup it myself.