Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
not able to establish socket connection with server running on different port based on path/endpoint

client --

var socket = io(
{
  transports : ['polling'],
  path : '/mysocket'
});

server--

io = require('socket.io')(server,{
   path : '/mysocket'
});

nginx --

location /socket/ {
  proxy_pass http://example.com:3005
}

https://example.com is running on two ports 3003 & 3005 all endpoints are connected to 3003 and my end point is connected to 3005 where my socket connections will be done,but the the socket is not connecting to 3005 instead it is connecting to 3003.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

it was nginx where i was missing i need to add

location /socket/ {
  proxy_http_version 1.1
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_pass http://example.com:3005;
}

this solved my issue

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!