E
E
Empty User2014-09-28 23:13:06
Nginx
Empty User, 2014-09-28 23:13:06

Why does Nginx interfere with Socket.io?

Hello! There is a chat on NodeJS + Socket.io, there is also a website. Installed everything on one server. Without Nginx everything works fine. Installed Nginx, and that's it, the chat stopped working. I understand that Nginx gives out socket.io files as static, but although these files are dynamic. How to make nginx not touch a specific folder at all? Or how to solve the problem in general?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Chistyakov, 2014-09-28
@dimash07

nginx accesses the backend over HTTP 1.0, which is incompatible with WebSockets.
The latest versions of nginx already know how to work with the HTTP 1.1 backend, try to take a newer version of nginx and enable the proxy_http_version 1.1 directive for the backend;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question