Unauthorized WOPI HOST

I want to try Collabora (CODE) on ownCloud. However, ownCloud warns me that it is “Unauthorized WOPI host” and cannot use it. I also run Nextcloud, but I can use Collabora from Nextcloud.

The difference between my ownCloud and Nextcloud environments is the server and domain. ownCloud is installed on a shared server. Therefore, detailed server settings are not possible. Nextcloud is installed on VPS(with Plesk). Collabora is also installed on same VPS.

I referred to the following when installing.

There were some changes on my server.

  • location ~ ^/lool/(.*)/ws$
  • location ~ ^/lool

I wrote the following and Collabora worked on Nextcloud.

  • location ^~ /lool/(.*)/ws$
  • location ^~ /lool

If I write as described on the official website, only the Collabora toolbar will be displayed. I have successfully used Collabora by doing the above.

If this method is applied to ownCloud as it is, it is “Unauthorized WOPI host”. If I write it according to the official website, only the toolbar is displayed. The file will not open.

How can I use Collabora on ownCloud?


  • Server A(Shared Server): ownCloud 10.6, PHP 7.3.14, MySQL 5.6, CentOS, LiteSpeed
  • Server B(VPS): Nextcloud 20.0.6, PHP 7.4.14, MariaDB 10.2.32, CentOS 7.8, Nginx 1.18.0, Plesk 18.0.33, Collabora CODE 6.4-20/loolwsd 6.4.4

Thanks

Is it not possible to call a single Collabora from two domains/servers in the first place?
Is there a configuration file to specify the domain, like launching with Docker?

I was able to solve it myself.

By editing /etc/loolwsd/loolwsd.xml I was able to use Collabora from both ownCloud and Nextcloud.

I wrote the following in the storage section:

<host desc="Regex pattern of hostname to allow or deny." allow="true">127\.0\.0\.1</host>
<host desc="Regex pattern of hostname to allow or deny." allow="true">owncloud\.myserver\.com</host>

Thanks,

1 Like