【发布时间】:2019-11-25 14:22:11
【问题描述】:
我正在尝试使用 https 在本地运行 django-channels 项目(该应用程序有一个需要 https 的 facebook 登录)。
我已按照说明使用 mkcert (https://github.com/FiloSottile/mkcert) 生成密钥和证书,并尝试通过运行 daphne -e ssl:443:privateKey=localhost+1-key.pem:certKey=localhost+1.pem django_project.asgi:application -p 8000 -b 0.0.0.0 来使用密钥和证书
服务器似乎启动正常,但是当我尝试访问 https://0.0.0.0:8000 时没有任何反应,最终我收到“响应时间太长”的消息。
没有新的输出添加到我启动服务器时出现的标准 daphne 输出:
2019-07-16 19:23:27,818 INFO HTTP/2 support enabled
2019-07-16 19:23:27,818 INFO Configuring endpoint ssl:8443:privateKey=../sec/localhost+1-key.pem:certKey=../sec/localhost+1.pem
2019-07-16 19:23:27,823 INFO Listening on TCP address 0.0.0.0:8443
2019-07-16 19:23:27,823 INFO Configuring endpoint tcp:port=8000:interface=0.0.0.0
2019-07-16 19:23:27,824 INFO Listening on TCP address 0.0.0.0:8000
有人可以帮忙吗?
【问题讨论】:
标签: django tls1.2 django-channels daphne