I have a big issue. I’m trying for moths now to get Mattermost (included within GitLab) running on my Plesk server. First, I’ve followed this tutorial to configure Mattermost within GitLab:
So far so good. Mattermost now runs on my localhost and the specific port. To make Mattermost accessible via web, I’ve created a subdomain on my Plesk server panel:
This also worked very fine. After this I’ve enabled SSL within Plesk and secured the domain:
When I access the domain, I can see that it has a valid SSL certificate now. To make Mattermost available over the domain, I’ve followed this guide:
As a result I’ve added the following configurations:
HTTP (permanent redirect to HTTPS)
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/.well-known/.*
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [last,redirect=301]
HTTPS (the real config for Mattermost)
ServerName mattermost.xxx.com
ProxyPreserveHost On
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
RewriteEngine On
RewriteCond %{REQUEST_URI} /api/v[0-9]+/(users/)?websocket [NC,OR]
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L]
<Location />
Require all granted
ProxyPass http://127.0.0.1:8065/
ProxyPassReverse http://127.0.0.1:8065/
ProxyPassReverseCookieDomain 127.0.0.1 mattermost.xxx.com/
</Location>
When I now access the URL, I can finally see Mattermost! But after waiting for some seconds I’ve got an error message at the top which indicated that there is something not working within the Websocket part:
websocket_client.tsx:71 WebSocket connection to ‘wss://mattermost.xxx.com/api/v4/websocket?connection_id=&sequence_number=0’ failed:
Looks not good! I’ve now checked the Apache logs:
AH01144: No protocol handler was valid for the URL /api/v4/websocket (scheme ‘ws’). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
I’ve done a lot (looooot) of research without any success. Contacted the Mattermost and Plesk support without any result. One of the most people told me that I need to enable some Apache modules but actually they are all enabled which are need for doing some proxy and WS stuff:
My last hope is you guys. Maybe someone uses Plesk in combination with Mattermost & GitLab and can help me.
PS: Setting the SSL certificate within the additional directives is not needed within my eyes since this part is done by Plesk itself.