I am working on a apache proxy to WebSockets and the connection works great on Chrome and Safari Mobile but Firefox returns a 200 Ok Status and disconnects.
The server in question is a Centos 7 server running Apache and the websocket is provided by NodeJS.
<VirtualHost *:443>
ServerAdmin webmaster@example.com
ServerName alpha.example.com
ServerAlias www.alpha.example.com
DocumentRoot public_html/
ErrorLog logs/error.log
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLProxyEngine On
Include cert.pem
SSLCertificateKeyFile privkey.pem
SSLCertificateChainFile chain.pem
ProxyRequests Off
RewriteEngine On
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://localhost:8080%{REQUEST_URI} [P]
ProxyPass /ws http://127.0.0.1:8080
ProxyPassReverse /ws http://127.0.0.1:8080
</VirtualHost>
Chrome connects to the server and I can send events both ways. Firefox attempts a connection but then closes immediately with a 200 Ok Status but logs Firefox can’t establish a connection to the server at wss://alpha.example.com/.
Firefox however can load Proxy requests like https://alpha.example.com/ws