Answer the question
In order to leave comments, you need to log in
How to add https to django?
There is a certificate, a private key, Ubuntu 16.
There is a django-sslserver module. I run it
through
python3 manage.py runsslserver and pass the path to the certificate and private key.
Displays an invalid certificate and key error. The certificate and key are obtained from the certificate issuing authority (Free SSH from reg.ru)
Answer the question
In order to leave comments, you need to log in
You're making it difficult.
1. The certificate should work only on the domain where it was ordered (which means that it does not serve localhost)
2. Django should not deal with SSL and security in any way
There are several options, they are all much simpler than yours:
1. Install caddyserver , you take the first config with TLS from the Internet, pull it on yourself, caddy monitors and updates the certificates. That's it, you forget about SSL, it just exists and works
. In Django, traffic is already decrypted via HTTP (not HTTPS)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question