CollaboraOnline / collabora-online-sdk-examples

Various minor pieces of code to be used in Collabora Online and related software
Apache License 2.0
31 stars 24 forks source link

cannot get the PHP example working #9

Open gstlouisgit opened 1 year ago

gstlouisgit commented 1 year ago

I have tried all sort of different ways, and I cannot get this to work

I have collabora working, through a proxy and url is something like https://docs.domain.ca Collabora works fine, mattermost can pull from it, I can do discovery etc etc

However, I want to build this into my web app. So I tried using this example https://github.com/CollaboraOnline/collabora-online-sdk-examples/tree/master/webapp/php

I've tried a sandbox online with https:// I get the same results I've tried the apache config provided with modifications to fit my env

I've tried several different settings in coolwsd. Nothing is working

Here is a screenshot of the ui

Screen Shot 2023-02-20 at 10 58 25 AM

gstlouisgit commented 1 year ago

I finally got this working.
Server version: Apache/2.4.6 (CentOS 7)

In the apache config file I needed to change the Options

        #Options Indexes MultiViews
        AllowOverride None
        <IfModule !mod_access_compat.c>
                Require all granted
        </IfModule>
        <IfModule mod_access_compat.c>
                Order allow,deny
                Allow from all
        </IfModule>

        Options Indexes FollowSymLinks Includes ExecCGI
        #AllowOverride All
        #Require all granted
        #Allow from all

I also needed to make change to the endpoints file as I did not see the "example_php" in preg_match for the parseWopiRequest function. ( I did not have apache setup with virtual host example_php )

However, now mattermost does not work as I am getting No acceptable WOPI hosts found matching the target host [mattermost.domain.ca] in config

I have the following setup in coolwsd.xml alias_groups is mode groups inside <group> I have <host allow="true" desc="hostname to allow or deny.">https://domain.ca</host> // custom app that is working <host allow="true" desc="hostname to allow or deny.">https://mattermost.domain.ca</host> // mattermost url

inside <wopi allow* <host allow="true" desc="Regex pattern of hostname to allow or deny.">domain\.ca</host> <host allow="true" desc="Regex pattern of hostname to allow or deny.">mattermost\.domain\.ca</host>

The calls from mattermost are https://mattermost.domain.ca/plugins/com.collaboraonline.mattermost/collaboraURL?file_id=ebf5a11df7bm5j4187r9f9fcpc

I'm not sure where to do from here. I'm assuming maybe a wildcard would help for inside .