Apache 2.4, mod_proxy_wstunnel, https->websockets

Hi there,

First of all: Great work with Mattermost so far!

i’m still facing some errors in redirecting https to websockets via Apache.
I’ve tried the hints from the following pages from the forum:
forum mattermost org/t/how-to-setup-a-simple-apache2-proxy-to-mattermost/495/4
forum mattermost org/t/solved-apache2-reverseproxy-with-websocket-https/437/3
github com/mattermost/platform/issues/872

…but ended up in using the apache module “mod_proxy_wstunnel”, because its not showing any “websocket connectivity” errors messages and is not slow in refreshing each time i switch channels.

Everything works just fine on https://chat.xyz.de/start/ (while start is the teamname) except:

  1. When i am logged in and press “Log out”
  • i get thrown back to the Browser URL "https://chat.xyz.destart/ -> Server not Found
    -> The Slash after “.de” gets lost!
  1. E-Mail Notification shows clearly a link to a channel like: https://chat.xyz.de/start/channel/123/, (WITH SLASH)

I already checked Apache Logs, but i cant find the clue where the slash gets lost…
But as i can see the Slash still like in the Notification Email, i assume that somewhere within Mattermost a “link back” or some “ajax Request” links to the wrong URL without slash

Is there anyone who has the same problem or knows what could be wrong?

This is my Apache Configuration:

[…]
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
[…]

< VirtualHost *:443 >
ServerName chat.xyz.de

SSLEngine on
SSLCertificateFile /etc/httpd/c…
SSLCertificateKeyFile /etc/httpd/c…
SSLCertificateChainFile /etc/httpd/c…
ServerSignature Off

ProxyRequests Off
ProxyPreserveHost On
ProxyPass “/” “ws://localhost:8065/” retry=0 timeout=5
ProxyPassReverse “/” “ws://localhost:8065/” chat.xyz.de

LogFormat “%{X-Forwarded-For}i %l %u %t “%r” %>s %b” common_forwarded
ErrorLog …
CustomLog …
CustomLog …
CustomLog …

< /VirtualHost >

looks like to be fixed with the candidate for documentation:

1 Like