Nginx 配置 SSL 後 command line curl出現錯誤 SSL certificate problem: unable to get local issuer certificate
BUBU 在公司遇到使用到 curl 連線到 nginx 某個站台,會報常異錯誤造無法連線。
- 以下是錯誤內容,經過檢查是因為 curl 連線時無法讀取到 ca 憑證問題。
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.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.
解決程過
- 那我們需要將兩個憑證合併後再放回去就可以正常使用了。
cat server.crt ca_bundle.crt > server.cer