The question is not very detailed, but the answer lies in the usage of Daphne with Django Channels. Daphne works between your nginx server code and your python application to direct traffic where it needs to go.
Our websocket in this instance is running local to our server. Unlike other setups, we are not contacting another server to connect to this websocket, but rather a port on our local system. However, as you seem to be aware, we need to use wss and https on an online production server rather than ws and http. Because our websocket is running locally to our server, our system recognizes it as a ws connection rather than a wss connection. Therefore, we need to redirect ws to wss in your nginx server configuration.
There are many different types of web servers that can be used with Django/Django Channels. You will have to figure out how to do this in your configuration. There are some decent answers here to get you started: Nginx Reverse Proxy Websockets
Here is an example of how I have solved the problem in Apache:
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://127.0.0.1:8001%{REQUEST_URI} [P,QSA,L]
ProxyPass /wss/ wss://127.0.0.1:8001/
ProxyPassReverse /wss/ wss://127.0.0.1:8001/
...
SSLEngine on
SSLCertificateFile /etc/ssl/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
SSLCertificateChainFile /etc/ssl/ca_bundle.crt
In production you also need an SSL certification which to ensure an encrypted connection, and you will need to specify that in your daphne instruction.
daphne -b 0.0.0.0 -p 8001 django_project.asgi:application // Local Development Level
daphne -e ssl:443:privateKey=key.pem:certKey=crt.pem django_project.asgi:application // Production Level