创建 AlphaSSL 完整 OCSP 证书链
证书关系:
域名证书
↓
中间证书(Intermediate Certificates)
↓
根证书(Root Certificates)
我们需要把“ 域名证书 - 中间证书 - 根证书 ”写入到 ocsp.crt 证书文件内。
AlphaSSL 根证书:https://support.globalsign.com/ca-certificates/root-certificates/globalsign-root-certificates
AlphaSSL 中间证书:https://support.globalsign.com/ca-certificates/intermediate-certificates/alphassl-intermediate-certificates
下面文本已经填写 中间证书 与 根证书,只需粘贴自己域名证书内容到前面保存文件即可使用。
文件路径(可以自定义)/etc/ssl/ocsp.crt
-----BEGIN CERTIFICATE-----
...
你的域名证书内容
...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIEijCCA3KgAwIBAgIQfU1CqStDHX5kU+fBmo1YdzANBgkqhkiG9w0BAQsFADBX
MQswCQYDVQQGEwJCRTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEQMA4GA1UE
CxMHUm9vdCBDQTEbMBkGA1UEAxMSR2xvYmFsU2lnbiBSb290IENBMB4XDTIyMTAx
MjAzNDk0M1oXDTI3MTAxMjAwMDAwMFowTDELMAkGA1UEBhMCQkUxGTAXBgNVBAoT
EEdsb2JhbFNpZ24gbnYtc2ExIjAgBgNVBAMTGUFscGhhU1NMIENBIC0gU0hBMjU2
IC0gRzQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtJCmVZhWIPzOH
A3jP1QwkuDFT8/+DImyZlSt85UpZwq7G0Sqd+n8gLlHIZypQkad5VkT7OLU+MI78
lC7LVwxpU19ExlaWL67ANyWG8XHx3AJFQoZhuDbvUeNzRQyQs6XS5wN6uDlF0Bf1
AtCUQWrGGLGYwyC1xTrzgrFKpESsIXMqklUGTsh8i7DKZhRUVfgrPLJUkbbLUrLY
42+KRCiwfSvBloC5PgDYnj3oMZ1aTe3Wfk3l1I4D3RKaJ4PU1qHXhHJOge2bjGIG
l6MsaBN+BB2sr6EnxX0xnMIbew2oIfOFoLqs47vh/GH4JN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----
添加 nginx 配置
在站点配置文件 server { } ssl 段内添加以下内容
# OCSP stapling
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/ssl/ocsp.crt; # 该路径为 ocsp 证书路径,以上面创建的文件路径为准
重启 nginx 服务
systemctl restart nginx
验证结果
通过 MySSL.com 验证域名,并显示如下结果则成功!
总结
OCSP 证书 = 完整证书链
版权声明:本文为原创文章,版权归 Cooluc's Blog 所有,转载请注明出处!
本文链接:https://www.cooluc.com/archives/254.html
友情提示:如果博客出现404或链接失效,请留言或者联系博主修复!
3 条评论
大佬你的AlphaSSL是在哪里买的啊
棒棒棒
懂了