Sample Header Ad - 728x90

Mattermost Websocket handshake fails when using apache as proxy

0 votes
0 answers
264 views
I'm not making any progress with my Mattermost installation on my server. I've installed everything without any problems. After that I've enabled the apache mod proxy_wstunnel and added the following directives in my Plesk domain for additional directives (it like ` or `): **HTTP:** ErrorLog ${APACHE_LOG_DIR}/mattermost-error.log CustomLog ${APACHE_LOG_DIR}/mattermost-access.log combined # Enforce HTTPS: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] **HTTPS:** ServerName mattermost.xxx.de ProxyPreserveHost On # Set web sockets ProxyRequests Off RemoteIPHeader CF-Connecting-IP 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] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule .* http://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L] RequestHeader set X-Forwarded-Proto "https" [0-9]+)/(?users/)?websocket"> Require all granted ProxyPass ws://127.0.0.1:8065/api/v%{env:MATCH_APIVERSION}/%{env:MATCH_APIUSERS}websocket ProxyPassReverse ws://127.0.0.1:8065/api/v%{env:MATCH_APIVERSION}/%{env:MATCH_APIUSERS}websocket ProxyPassReverseCookieDomain 127.0.0.1 mattermost.xxx.de Require all granted ProxyPass http://127.0.0.1:8065/ ProxyPassReverse http://127.0.0.1:8065/ ProxyPassReverseCookieDomain 127.0.0.1 mattermost.xxx.de But when I save this, restart apache and go back to Mattermost, I'm still getting the Websocket error: enter image description here In the network tab the response is empty....
Asked by Mr. Jo (203 rep)
Jan 30, 2021, 01:43 PM