运行如下命令,则报错
curl https://www.baidu.com/index.html
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
解决方案:必须将服务器证书从 cert.cer 更改为 fullchain.cer
浏览器可能仅使用 cert.cer 就能正常工作,但 curl 或 httpie 等 CLI 程序则需要 fullchain.cer 才能正常工作。