weixin_43770519
lrving77
采纳率0%
2019-11-13 18:08 阅读 1.5k

curl: (60) SSL certificate problem: self signed certificate

在ubuntu18.04中使用curl访问报错如下:

ubuntu@nginx:~$ curl  https://10.10.10.100:9997/playwpt/admin
curl: (60) SSL certificate problem: self signed 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.

按照网络上的教程进行了设置:
从curl官方网站,下载根证书:cacert.pem ,然后修改php.ini中加入该证书,并重启web服务。
在php.ini中加入

[SSL]
curl.cainfo = "/etc/php/7.2/cacert.pem"
openssl.cafile = "${curl.cainfo}"

我按照上述方法设置后,再次访问时还是出现相同的报错,请问这个如何解决,谢谢!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

相关推荐