curl: (60) SSL certificate problem: unable to get local issuer certificate

前端 未结 26 2878
我寻月下人不归
我寻月下人不归 2020-11-22 08:09
root@sclrdev:/home/sclr/certs/FreshCerts# curl --ftp-ssl --verbose ftp://{abc}/ -u trup:trup --cacert /etc/ssl/certs/ca-certificates.crt
* About to connect() to {abc         


        
26条回答
  •  醉话见心
    2020-11-22 08:47

    Relating to 'SSL certificate problem: unable to get local issuer certificate' error. It is important to note that this applies to the system sending the CURL request, and NOT the server receiving the request.

    1. Download the latest cacert.pem from https://curl.haxx.se/ca/cacert.pem

    2. Add the following line to php.ini: (if this is shared hosting and you don't have access to php.ini then you could add this to .user.ini in public_html).

      curl.cainfo="/path/to/downloaded/cacert.pem"

      Make sure you enclose the path within double quotation marks!!!

    3. By default, the FastCGI process will parse new files every 300 seconds (if required you can change the frequency by adding a couple of files as suggested here https://ss88.uk/blog/fast-cgi-and-user-ini-files-the-new-htaccess/).

提交回复
热议问题