Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use nginx proxy sockjs-tornado #65

Open
wushuyi opened this issue Sep 9, 2014 · 2 comments
Open

how to use nginx proxy sockjs-tornado #65

wushuyi opened this issue Sep 9, 2014 · 2 comments

Comments

@wushuyi
Copy link

wushuyi commented Sep 9, 2014

how to use nginx proxy sockjs-tornado
WebSocket connection to 'ws://192.168.122.141/tornado/sockjs/215/dm1kkghf/websocket' failed: Error during WebSocket handshake: Unexpected response code: 502

@flaviogrossi
Copy link

hi, i wrote about the nginx configuration needed for sockjs here
https://github.com/flaviogrossi/sockjs-cyclone#nginx
there is also an example configuration file linked there

hope this helps

@wushuyi
Copy link
Author

wushuyi commented Sep 9, 2014

Think you,
I use nginx.conf:
upstream frontends{
server 127.0.0.1:8001;
server 127.0.0.1:8002;
server 127.0.0.1:8003;
server 127.0.0.1:8004;
}
server{
location /tornado/ {
proxy_pass http://frontends/;
proxy_set_header X-Scheme $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass_header Server;
}
}
It work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants