要在 django 中使用 ssl,我使用以下命令:
python3 manage.py runsslserver xx.8x.x3.x4:443 --certificate /etc/letsencrypt/live/callservps.online/fullchain.pem --key /etc/letsencrypt/live/callserv.com/privkey.pem
使用该证书和密钥运行 gunicorn:
gunicorn --bind xx.8x.x3.x4:443:443 -certfile=/etc/letsencrypt/live/callserv.online/fullchain.pem -keyfile=/etc/letsencrypt/live/callserv.online/privkey.pem callservps.wsgi
但是,它给了我错误。
<块引用>无法连接到 (xx.8x.x3.x4:443:443)
我认为问题在于证书和密钥的扩展名为 .pem。但我不确定如何正确实施以使用 https 以及那些证书和密钥运行 gunicorn