在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}"
我按照上述方法设置后,再次访问时还是出现相同的报错,请问这个如何解决,谢谢!