- 在之前的博客中在腾讯云Windows服务器上部署好了Django接口,可以用http访问
- 本文借鉴整理自文章:https://cloud.tencent.com/developer/article/1349715
获取【1_域名_bundle.crt】和【2_域名.key】两个文件
首先从腾讯云控制台下载证书文件
下载完后在压缩包的Nginx文件夹中可以找到这两个文件,复制到服务器的项目文件夹下(就是和manage.py放在同一目录下)
Python包下载
pip install django-extensions
pip install django-werkzeug-debugger-runserver
pip install pyOpenSSL
配置项目的setting.py
在INSTALLED_APPS中加入
'werkzeug_debugger_runserver',
'django_extensions',
启动
在项目文件夹下运行cmd命令
python manage.py runserver_plus 0.0.0.0:8000 --cert 1_域名_bundle.crt --key-file 2_域名.key