CODE recently broke multihosts configurations. Previously, it was possibly to configure the CODE server to accept requests from several “integration” hosts by correctly setting the domain
variable as described in CODE Docker image — SDK https://sdk.collaboraonline.com/ documentation
This no longer works, there’s also a bug report on GitHub regarding this.
However, even with adjusting coolwsd.xml
as described in this bug report, I was not yet able to get it to work. CODE will always accept connections from the first host trying to connect, and refuse the other one afterwards, saying
[ docbroker_005 ] ERR loading document exception: No acceptable WOPI hosts found matching the target host [nextcloud.example.com] in config.| wsd/DocumentBroker.cpp:2124
(CODE 21.11.3.4 git hash: 2ea9477)
CODE is running in a Docker container which listens locally, and I use an Apache httpd reverse proxy on this host which terminates incoming TLS connections and forwards the http connection to the CODE container.
My <wopi>
block currently looks as follows:
<wopi desc="Allow/deny wopi storage." allow="true">
<host desc="Regex pattern of hostname to allow or deny." allow="true">(nextcloud.(example.com|example.net))</host>
<host desc="Regex pattern of hostname to allow or deny." allow="true">10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="Regex pattern of hostname to allow or deny." allow="true">172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="Regex pattern of hostname to allow or deny." allow="true">172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="Regex pattern of hostname to allow or deny." allow="true">172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="Regex pattern of hostname to allow or deny." allow="true">192\.168\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="Regex pattern of hostname to allow or deny." allow="false">192\.168\.1\.1</host>
<max_file_size desc="Maximum document size in bytes to load. 0 for unlimited." type="uint">0</max_file_size>
<locking desc="Locking settings">
<refresh desc="How frequently we should re-acquire a lock with the storage server, in seconds (default 15 mins) or 0 for no refresh" type="int" default="900">900</refresh>
</locking>
<alias_groups desc="default mode is 'first' it allows only the first host when groups are not defined. set mode to 'groups' and define group to allow multiple host and its aliases" mode="groups">
<!-- If you need to use multiple wopi hosts, please change the mode to "groups" and
add the hosts below. If one host is accessible under multiple ip addresses
or names, add them as aliases. -->
<!--<group>
<host desc="hostname to allow or deny." allow="true">scheme://hostname:port</host>
<alias desc="regex pattern of aliasname">scheme://aliasname1:port</alias>
<alias desc="regex pattern of aliasname">scheme://aliasname2:port</alias>
</group>-->
<!-- More "group"s possible here -->
<group>
<host desc="hostname to allow or deny." allow="true">https://nextcloud.example.com</host>
</group>
<group>
<host desc="hostname to allow or deny." allow="true">https://nextcloud.example.net</host>
</group>
</alias_groups>
</wopi>
I also tried http
instead of https
as the protocol, as my CODE, but this didn’t change anything…
I think I got something wrong, but also after re-reading the bugreport and Configuration — SDK https://sdk.collaboraonline.com/ documentation , I can’t figure out, where my mistake lies…