Websocket 200 error over HTTPS


I am getting and error WebSocket connection to 'wss://*’ failed: Error during WebSocket handshake: Unexpected response code: 200 while running a meteor app on Centos Apache 2.2, the httpd conf is as follows
SSLEngine on
SSLProxyEngine On
ProxyRequests Off
ProxyPass / http
ProxyPassReverse / htp

RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* wss://localhost:8300/%{REQUEST_URI} [P]

the app runs on port 8300, and the domain is https://mondozapp.com, i get this error only while accessing the site through https, if I go to mondozapp.com:8300 everything is good. Please help, struggling with this for past 4 days :slight_smile:


https://mondozapp.com/ is coming up for me without any web socket errors (there are a few other things listed in the console, but no errors).


For the time being we have disabled the websockets using DISABLE_WEBSOCKETS = 1 env variable, do you think you can figure out anything from the Apache config that I shared?


Good question, I’ll try - it looks like you’re pointing to a wss endpoint:

RewriteRule .* wss://localhost:8300/%{REQUEST_URI} [P]

Just to confirm - are you sure you want to use a secure web socket connection here? Have you tried with just ws://?