• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Basic Guide for using NGINX with Web-Sockets

Max5593

New Pleskian
Hi,

after 2 days of research i didnt find any working solution to get access to my Nodejs Websocket server.

My Setup:
Nodejs Server with a regular API, listening on assigned Port (i.e. 33333) - everything works fine, every request goes through

On that same nodejs Server i also run a socket.io API which runs on another port (i.e. 22222). Concerning this Socket API i have no clue how to define the NGINX Plesk configuration.

Could somebody write down basic steps how to setup the NGINX Socket Conf?
Is it even possible to use sw-nginx (custom Plesk nginx version) with WebSockets?

Greetings Max
 

I also tried adding a location directive. It looks like the following:


==> This is the socket api
location /api1/ {
proxy_pass http://localhost:62646/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}

==> This is the other classic and working api
location /api2/ {
proxy_pass http://localhost:62233/;
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;
}

The big problem: The socket.io polling request displays error message 404 - Not found.
When i open the socket connect Url (http://myPleskDomainname/api1/) in my Browser it even displays the error response of my working api. Looks like there is a redirect to api2
 
Last edited:
Back
Top