1、首先有 京东云的服务器 和 域名,并备案通过。
2、在云安全-ssl安全证书申购证书
3、在域名服务-域名服务-域名管理界面选择解析 对ip和域名进行绑定,注意在主机记录一栏要空着,否则可能验证失败。
4、在申购管理界面,获取
文件路径 | xxxx.com/.well-known/pki-validation/fileauth.txt |
文件内容 | 2019062200000019wmtblxn6c0sl36zcr8hm5lhahsx3flo68iz58kqv1grxwttz |
5、目前是访问上述网页的时候能返回文件内容。
直接修改django中urls文件,使其访问xxxx.com/.well-known/pki-validation/fileauth.txt 中网页显示2019062200000019wmtblxn6c0sl36zcr8hm5lhahsx3flo68iz58kqv1grxwttz
urls文件
path(r'.well-known/pki-validation/fileauth.txt',include('dir.urls')),
dir文件
urlpatterns = [
path(r'', main.hello),
]
main文件hello函数
def hello(request):
return HttpResponse("2019062200000019wmtblxn6c0sl36zcr8hm5lhahsx3flo68iz58kqv1grxwttz ")
具体不再赘述
6、而后选择验证,等待10分钟之后,ssl证书就申请下来了。