简体   繁体   中英

Django + https on localhost

I have files of TLS certificate(.crt) and key(.key) How can i add them in settings.py and run localhost with https( it is need to add them as text variables not path to these files)? Thanks in advance!

Django runserver does not implement HTTPS and it was not meant to be used in production anyway. There is a package that works similarly with support for SSL ( django-sslserver ) but rather than using it I would consider setup of NGINX or Apache similar to what could be used in production.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM