Replies: 3 comments
-
Normally you have nginx terminate the SSL and then proxy to Daphne from there. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Do I need Django app + daphne running at the same time? If yes, why? How to do it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@mhdaouas you use Daphne to run your django app. Your error message seems to indicate that:
You can read more about this setting here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I want to serve a Django web app with Channels on nginx with SSL and be able to call my Channels websocket with wss:// so I don't get a mixed content error in the Chrome browser. I've been unable to create a reverse proxy (with proxy pass) in the production environment. Can you explain to me clearly how to proceed.
Should I run a daphne instance or can I directly do it just by modifying the nginx config?
Should the daphne instance run with SSL?
What command should I use to run daphne?
When I try the following command:
daphne -e ssl:443:privateKey=/home/.../django/env/lib/python3.9/site-packages/sslserver/certs/development.crt:certKey=/home/.../django/env/lib/python3.9/site-packages/sslserver/certs/development.key apdjango.asgi:application
I get this error:
My asgi.py script:
Here is the content of manage.py:
In my settings.py, I have added these lines:
Your help is appreciated.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions