To use ssl with django I use the following command:
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
To run gunicorn with that certificate and key:
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
But, it give me error.
Can't connect to (xx.8x.x3.x4:443:443)
I think the problem is that the certificate and the key have a .pem extension. But I'm not sure how to implement this correctly to run gunicorn with https and those certificates and keys