• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • 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.

Question NodeJS Websocket Nginx with process.env.PORT?

oreoneo

New Pleskian
Server operating system version
idk
Plesk version and microupdate number
idk
Hello,

since Nodejs gets a port from passenger, I wanted to ask how I can use it with a websocket, because a websocket requires additional settings for nginx with a fixed port. Currently I have this in nginx. (Just wanted to say that the server does not belong to me directly, so I host with a web hosting service, therefore all "additional Nginx settings" must be made by a supporter and i cant see the versions)

location /ws {
proxy_pass http://localhost:3009/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
 
Hi, yes I had already done that and with the websocket everything works so I can connect and send things etc. I just wanted to know if I can somehow take the passenger port with nginx or have to take a fixed port, because other customers of the hoster of course also use the ports and I don't want to get in the way but it also could be that passenger assigns the port to someone else and then I would have go to support and have the nginx config rewritten to another port before I can get it online again.
 
Back
Top