Trying my luck her as StackOverflow was not the right place to ask. Hopefully this is where my question belongs!
I have been pulling my hair the last few days getting websockets to work with Apache2.4. I finally found a solution that worked for me, namely the following:
<VirtualHost *:80>
ServerName www.domain2.com
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:3001/$1 [P,L]
ProxyPass / http://localhost:3001/
ProxyPassReverse / http://localhost:3001/
</VirtualHost>
The problem? Well, as soon as I switch over to wss, I am out of luck. At first, I hoped I could just change ws to wss above, but that didn't do the trick, I still get a 500 error. What might I be missing? (I use socket.io and the request looks like this: wss://xxx.yy/socket.io/?auth=YYY&EIO=3&transport=websocket&sid=XXX