Integrating Mattermost into Web/DeskApp

As far as I can tell, the only way to now intergrate Mattermost into Web/DeskApp is to use the WebApp Intranet plugin. Am I correct??

Assuming I am, I have configured the plugin as so:

<?php
define('PLUGIN_INTRANET_USER_DEFAULT_ENABLE', true);
define('PLUGIN_INTRANET_BUTTON_TITLE', 'Mattermost');
define('PLUGIN_INTRANET_URL', 'https://mattermost/');

When I do this, I see a “Loading” GIF with a Cert Error behind but greyed out so I can’t hit continue (I’m using a self-signed cert which I have previously accepting in the same browser)

If I change the URL to use normal HTTP like:

define('PLUGIN_INTRANET_URL', 'http://mattermost/');

I see a “Loading” GIF with a blank screen…

I’m guessing that this is because of some secure/insecure problem in the browser!
So I’ve tried to modify the WebApp server to perform a reverse look up using a custom site config hoping to get around this problem: (The Mattermost server is available on port 8065 (from the Application) and 80 and 443 (from Nginx)

ProxyPass "/mattermost"  "http://mattermost:8065/"
ProxyPassReverse "/mattermost"  "http://mattermost:8065/"

But if I test the webpage (i.e. http://mail/mattermost) all I get is a “Cannot connect to Mattermost” notice on the webpage.

Any ideas how to get this to work?
Thanks
Bob

RTFM… :)

@fbartels

+1

it’s all in your signature;) Felix
very good work

So here is my problem…

Users can access our webapp via https://mail.i.opw.ie/ or https://mail/ however it seems I can only enter a single URL into the NGINX config - this doesn’t even include my random testing sites.

Is there a way to allow all URLs for CORS?

Thanks
Bob

@robertwbrandt there are multiple ways. see https://stackoverflow.com/questions/10205192/x-frame-options-allow-from-multiple-domains for example.

Generally speaking I would recommend to unify hostnames so they are the same for internal and external access. makes ssl certificates easier to manage as well.

Good man!!! I was too focused on the X-Frame-Options which can’t have multiple entries…

It works great in Chrome and Firefox, but IE doesn’t like it (although it allows you to open it up in another tab.)

Hi,
well it seems like I am doing something wrong. I have just installed mattermost today. So far all is running, but I am struggeling with the deskapp integration.

as said in: https://documentation.kopano.io/kopano_mattermost_manual/first_steps.html#configuration-for-kopano-webapp-deskapp

I modified the /etc/apache2/sites-available/mattermost.conf and commented out the lines which point to my kopanoserver mail2.mydomain.at.

In /etc/kopano/webapp I modified the config-mattermost.php:

<?php

define('PLUGIN_MATTERMOST_USER_DEFAULT_ENABLE', false);

define('PLUGIN_MATTERMOST_URL', 'https://mail2.mydomain.at');

// This setting can be changed by the user in his settings.
// Here you can define the default behaviour.
define('PLUGIN_MATTERMOST_AUTOSTART', true);

Restarted everything.

But when I try to open Mattermost in Webapp it says:

Not Found

The requested URL /webapp/<URL-OF-YOUR-MATTERMOST> was not found on this server. 

which exactly was the “text” in the config-mattermost.php I modified.

Do you have enabled the vHost for Mattermost (a2ensite mattermost) and restarted Apache?

yes it is enabled and Apache is restarted.

Mattermost is running via Web, Client, App on the phone but not in the DeskApp.

Update: Hm, today it is working. Nothing changed. (Except the Workstation, where Deskapp runs, was shutdown/restarted).