Use the collabora behind a proxy

I’m setting a server on internet where is installed a nextcloud and try to set also a collabora server using another server inside a private network.
To do this i’m trying to set a reverse proxy betweenthe nextcloud server and the collabora server.

Apparently it don’tseemto work, but more probably I do some wrong.

My topology is like this:



I notice that the handshaking between nextcloud and collabora don’t work if I dont’ put the name
of the collabora server in the loolwds.xml server-name tag.
But this mean that the collabora editor is not able to work when the user i out of internal network because the browser don’t reach (don’t now) the server name of the collabora service.
Also I notice that I use the
nextcloud server name for the
loolwds.xml server name tag the collabora editor don’t seem to work.

So my question is if the collabora is capable to work behind a reverse proxy.
And if there is some docs on this setting.

My settings are these:

In the loolwsd.xml in the collabora server:

<server_name default="" desc="External hostname:port of the server running loolwsd. If empty, it's derived from the request (please set it if this doesn't work). Must be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string"></server_name>

In the reverse proxy settings in the nextcloud server:

<VirtualHost *:5246>
ProxyPreserveHost On
ProxyRequests Off

    SSLProxyEngine on
    ProxyPass /
    ProxyPassReverse /

many thx.