Socket.io failing when publishing to Plesk hosting

Afternoon all, I just finished a small app for a cilent and I uploaded it to the hosting and when I load the page, I get a done of socket.io errors all like below.

URL: wss://the.domain.com/socket.io/?EIO=4&transport=websocket
Status: 400 Bad Request

Looking at my files on the hosting server, there is no socket.io at the root like where the wss is pointing. I do see a folder called I do see various socket.io folders inside the node_modules which is in the root folder. Do I need to point that url to node_modules/socket.io folder? If so, where to I edit that url? FYI, that’s not the real domain of course, because I didn’t want to show it…haha

Thanks in advance,
Twitch

Ok I fixed it and putting here in case anyone has the same problem.

This is a NodeJS app I’m hosting on Plesk. In order for sockets to work, you have to go to Apache & nginx Settings for the site and In the nginx settings section, clear the Proxy mode checkbox.

As soon as I disabled that, the site loaded properly.

1 Like