V
V
vgavdeev2016-04-14 02:21:15
Nginx
vgavdeev, 2016-04-14 02:21:15

Nginx does not allow Node.js Socket.io to work. How to configure?

Can't configure nginx to proxy socket.io. Help pliz

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2016-04-14
@mayken

I am using this config:

server {
  listen 8000;
  server_name socket.domain.com;

  location / {
    proxy_pass http://127.0.0.1:5001;
    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;
  }
}

K
krumza, 2016-04-15
@krumza

maybe like this:
server {
listen 80;
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question