• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Web Sockets Node.js?

UweP

Regular Pleskian
Hi. Is it possible to enable websockets for node.js apps? I have nodebb and it requires websockets to work.
One of their devs asked me if websockets work but I have no idea if it does?
 
Ok what I need is socket.io support for the vhost. Is this possible somehow?

Thank you, Uwe.
 
When you run "NPM install" all required components should be installed. If you check node_modules directory for you nodebb, you will see

drwxr-xr-x 4 user_yrppmfmulk psacln 4096 Nov 17 12:02 websocket-driver
drwxr-xr-x 3 user_yrppmfmulk psacln 4096 Nov 17 12:02 websocket-extensions

at least.
And of course, you can install it for you nodebb manually with

-sh-4.2$ /opt/plesk/node/6/bin/npm install websocket
 
Hm but I keep getting:

Firefox kann keine Verbindung zu dem Server unter wss://forum.nextgamers.eu/socket.io/?EIO=3&transport=websocket&sid=TheSessIoNID aufbauen.
Which means firefox cant establish a connection to server at wss://...
 
I suppose that it is more nodebb specific issue than Plesk.
 
Are you sure? Because they ask me if my host supports it. Well ... I don't know I hope I can get this fixed. I'd really like to use nodebb.
 
Node.js is supported by Plesk. All NPM requirements for nodebb (including websocket) were installed. All that you need is using some kind of instruction how to configure websocket properly for nodebb.
 
I'm sitting in front of this since 1 day now, several hours. it would be a pitty if it wouldnt work in the end.
 
Well does anyone know, where the passenger log file is? is it /var/log/apache2/error.log .. just for my information. because it seems to not even listen on that port 4567 cant telnet there. they also say i should start it usin nodebb start but im just using app.js ... is that correct? i dont know what i should do.
 
Maybe it's time to start using nginx if you want to use websockets. It's possible to setup it on Apache, but there are some drawbacks of such approach.

As for log file. Most probably Passenger tries to store the records at /var/log/apache2/error.log

As for port for Node.js app. In case of Passenger it doesn't make sense. It completely virtual (you declare any port in your app), because Passenger acts as app server, catches the requests and serves the app.
 
Back
Top