Is nginx serving the websocket only? Or is it serving a Django application in addition to the websockets?
You need different location directives for nginx to handle the websocket connections differently from your regular http traffic.
See:
Also see the threads at Connection failed in the websockets with channels and Websocket + Django on production (https) for examples.