How can I configure nginx (latest version, they say it supports websockets) to support WebSockets.
And how can I use python to run websockets connection.
That what I want:
- client creates WebSocket with JavaScript;
- websocket server script runs on python;
- and nginx in backend of all of this.
Can any body help me?
I took a quick look at the relevant changeset to Nginx, and it looks like all you need to do to start handling websocket requests is to set up a proxy in your nginx config. So for example:
This little configuration snippet will proxy incoming websocket traffic to your Python application server, assumed in the example to be listening for local connections on port 5000.
Hope this helps.