Summary
Wss proxy passing doesnot working
Steps to reproduce
I’ve got a gitlab 11 server in my local network at address 192.168.3.230 and reverse proxy server on address 192.168.3.35 which passing traffic from internet to intranet. I’ve successfully setted up gitlab proxy pass and mattermost proxypass in partial (login page and mattermost site works as well, but not a websockets. my apache conf listed below:
<VirtualHost :443>
SSLEngine on
SSLProxyEngine On
ServerName mattermost.server.org
ErrorLog /var/log/apache2/mattermost-error.log
CustomLog /var/log/apache2/mattermost-access.log combined
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 . wss://192.168.3.230:8065%{REQUEST_URI} [P,QSA,L]
#RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
#RewriteRule .* https://192.168.3.230:8065%{REQUEST_URI} [P,QSA,L]
RequestHeader set X-Forwarded-Proto “https”
RequestHeader unset If-Modified-Since
RequestHeader unset If-None-Match
<LocationMatch "/api/(?<version>v[0-9]+)/(?<users>users/)?websocket$">
Require all granted
ProxyPassReverse wss://192.168.3.230:8065/api/v%{env:MATCH_VERSION}/%{env:MATCH_USERS}websocket
ProxyPassReverseCookieDomain 192.168.3.230 mattermost.server.org
</LocationMatch>
<Location />
Require all granted
ProxyPass https://192.168.3.230/
ProxyPassReverse https://192.168.3.230/
ProxyPassReverseCookieDomain 192.168.3.230 mattermost.server.org
</Location>
ProxyPreserveHost On
ProxyRequests Off
SSLCertificateFile /etc/letsencrypt/live/mattermost.server.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mattermost.server.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
Observed behavior
websocket_client.jsx:38 WebSocket connection to wss://mattermost.server.org/api/v4/websocket’ failed: Error during WebSocket handshake: Unexpected response code: 503
is it possible to proxy wss websocket?