Yep, to proxy Websockets with nginx, you need to be using at least
version nginx version 1.4, and add the following rules:
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
As a practical example, I have the following block in my nginx configs
for each of my apps that run websockets:
location / {
proxy_pass
http://127.0.0.1:8020;
proxy_set_header Host $host;
# WebSocket support (nginx 1.4)
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
>
https://groups.google.com/d/msgid/chicagoboss/4A001F4B-7325-43CB-BC25-815C29F954DF%40gmail.com.
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 ||
sigma-star.com || @jessegumm