Linux: Ubuntu21.10HTTPServer: Apache/2.4.48 ( Ubuntu ) SSL证书类型:由Sectigo颁发的通配符SSL证书(即NOT自签名)
The问题: Mediawiki执行内部回送HTTPS调用来加载其可视化GUI编辑器。问题在于证书验证失败,因为Mediawiki试图联系自己。换句话说,如果此命令在从提供MediaWiki的同一服务器(本地主机)发出时失败:
$ curl 'https://host.domain.com/rest.php/v1/page/Main_Page'...then可视化编辑器将失败。它确实是这样。当从远程客户端生成HTTPS时,MediaWiki站点的其余部分工作正常。
Failure详细信息:
$ curl 'https://host.domain.com/rest.php/v1/page/Main_Page'
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.但是证书是有效的。当我们不是从本地主机进行网络调用时,它可以很好地工作。我还访问了错误消息中提供的CURL链接,但没有看到任何与我的情况相关的内容。
问题:当从本地主机发出curl调用时,我需要做什么才能使curl不失败?
发布于 2022-02-10 16:46:06
从主机curl 'https://host.domain.com/rest.php/v1/page/Main_Page'运行时,host.domain.com命令会失败吗?这肯定与本地系统中缺少证书颁发者的根证书(S)有关。
请记住,curl是这里的客户端,需要能够验证从根到the服务器的证书链。
应该将get服务器配置为产生足够多的链,以便从公共签名证书获取到它本身,但是您需要有根证书。
在Debian上,我将尝试更新证书包。
apt install ca-certificates如果这没有帮助,那么我需要获得公共根证书以添加到/usr/local/share/ca-certificates中,然后运行update-ca-certificates来重建证书数据库。(有关更多细节,请参见man update-ca-certificates。)
https://unix.stackexchange.com/questions/690109
复制相似问题