Skip to content

Nginx and socket.io

chrislea edited this page Feb 23, 2013 · 3 revisions

NGINX does not support the websocket protocol yet. Because of this, only XHR and JSONP transports would work.

Although NGINX 1.2 includes support for HTTP 1.1 protocol, it still does not support proxying websockets. Support for websockets is planned for version 1.3.

In the meantime, you can use some node.js based proxy or generic proxy like HAProxy or Varnish.

check out https://github.com/yaoweibin/nginx_tcp_proxy_module it's 3rd party

Update: Feb 20 2013 "NGINX Announces Support for WebSocket Protocol"

Update: Feb 23 2013 I (@chrislea) have Nginx packages of 1.3.13 (and will maintain new versions as they come out) for Ubuntu here: http://bit.ly/e6De6N. I also have written a very short tutorial of how to configure Nginx for WebSockets here: http://wp.me/p2RR6b-1r.

Clone this wiki locally