Take a look at this picture. The only difference you have you need to make both applications to talk to each other through reverse proxy. Easiest way is in my eyes to use public hostnames everywhere and always use https - this way my installation works from the beginning (I use docker but the idea is the same). most important idea in this integration there is “triangle” between client, Nextcloud and Collabora - and this triangle must be constant (in terms same FQDN from each point of view)