Incompatibility with cPanel / Plesk
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
I feel like I may have responded to you before on this issue so forgive me if I'm reposting the same thing, but:
This might help you out when configuring apache with NodeBB. Personally don't have any experience with this, but I've seen a few people who have figured out how to get websockets working for NodeBB, so it's definitely doable. Hope that helps
@psychobunny I believe it has something to do with CentOS or running Plesk/cPanel as I have not for the life of me been able to make it work properly, even with that guide. We are switching to a Debian server soon without Plesk or cPanel so hopefully that will render the issue solved.