WordPress错误:[] cURL error 60: SSL certificate problem: unable to get local issuer certificate

原因:SSL证书缺少根证书

如果你是自己上传的证书,那就是只设置了秘钥和域名证书

如果下载的SSL证书有三个文件

ca_bundle.crt 根证书

certificate.crt 域名证书

private.key 秘钥

如果是Apache服务器,则是这样设置

SSLEngine                on
SSLCertificateFile       /etc/ssl/certificate.crt
SSLCertificateKeyFile    /etc/ssl/private.key
SSLCertificateChainFile  /etc/ssl/ca_bundle.crt

如果是Nginx服务器,则要把 certificate.crt 和 ca_bundle.crt 文件合并

cat certificate.crt ca_bundle.crt  certificate.crt

然后这样设置

ssl                  on;
ssl_certificate      /etc/ssl/certificate.crt; 
ssl_certificate_key  /etc/ssl/private.key;