This is going to be an ongoing thread until I find a solution. Basically the issue occurs when running NodeBB on a CentOS box running with Apache with cPanel or Plesk installed. The following error occurs:
WebSocket connection to 'ws://forum.yoursite.com/socket.io/1/websocket/PQ8V495-7G6Rks65vcn6' failed: Error during WebSocket handshake: Unexpected response code: 502
It eventually connects, however, it only delays connecting by an average of 5-10 seconds.
This is a pervasive error that I've run into on multiple servers with various configurations, and I figure that it is due to the fact that NodeBB may be incompatible with cPanel and/or Plesk in one way or another. Either that or my apache configurations are off on both servers, however I've run node.js apps before on them and the apache configs have worked fine for them.
If anyone has a solution I will be eternally grateful.
Edit: I should have specified what my apache config is first. This is what I have currently, after a few iterations:
Allow from all
ProxyPass / http://stockrender.com:4567/
ProxyPassReverse / http://stockrender.com:4567/