Can't get the built-in CODE Server to work

Ok, here is what we got:

Nextcloud version: 20.0.6
Operating system and version: Debian Buster
Webserver: Apache 2.4.38
PHP version: 7.3.19-1~deb10u1

Now I wanted to replace Onlyoffice (the community edition from the app store) with Collabora Online and the built-in CODE server from the app store.

I disabled Onlyoffice and installed both new apps from the store. Now when I open the Collabora Online app for the settings it says that the built-in CODE can be reached.

But when I try to open a document all I get is an empty screen as shown in the screenshot.

When I take a look in the developer console of my Firefox I can see a HTTP error 400:

POST https://mywebserver/apps/richdocumentscode/proxy.php?req=/lool/https%3A%2F%2Fmywebserver%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F3325_ocfhp5x3h2ga...

Results in [HTTP/2 400 Bad Request]

Using one of the provided external demo servers for Collabora with the same file works fine though.

What’s wrong here?

Same problem here did u manage to find a solution

I have exactly the same problem with the built in Collabora server. My Nextcloud is hosted without an own domain. Its hosted like

I also see the bad request error 400 in the browser’s log when the browser requests

Now i found out an interesting fact: This problem only occurs when I try to open a document from an external device. When opening the nextcloud from the server itself (and ignoring the SSL warnings) via https://localhost/nextcloud , the collabora server works like a charm.

But now I have no idea how to track down the error. Does anyone have an idea?

I fixed it! The solution was to put the public domain in /etc/hosts.

My /etc/hosts now looks like this (Debian):       my.domain.tld localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters       myservername

now it works like a charm