[英]Curl error “no alternative certificate..”
We have a problem in only one of our servers hosted at Amazon (the development server). 我们只有一个托管在亚马逊上的服务器(开发服务器)存在问题。 The problem happens when doing a curl request to a specific domain, by running this:
通过运行以下命令向特定域执行curl请求时,会发生问题:
> curl https://api.plivo.com
Results in: 结果是:
curl: (51) SSL: no alternative certificate subject name matches target host name 'api.plivo.com'
curl:(51)SSL:没有其他证书主题名称与目标主机名“ api.plivo.com”匹配
I did some research and found out that it might be a problem with the server's certificate, however if I try this from any other server it works fine, same on my local machine. 我进行了一些研究,发现服务器的证书可能有问题,但是,如果我从其他任何服务器上尝试使用此证书,都可以正常工作,与本地计算机上的证书相同。 So I'm thinking that this might be a cache issue from curl?
因此,我认为这可能是curl造成的缓存问题? I tried reinstalling it, updating it, but no dice.
我尝试重新安装,更新它,但没有骰子。 I'm almost creating a new dev machine because of this, because it's blocking us from using this service.
因此,我几乎要创建一台新的开发机,因为它阻止了我们使用该服务。
To summarize from the comments: 从评论中总结:
/etc/hosts
which was used instead of asking the DNS server. /etc/hosts
有一个条目,该条目是用来代替DNS服务器的。 curl -v
and realizing that the shown target IP address was different. curl -v
的输出并意识到所显示的目标IP地址不同,发现了问题。 /etc/hosts
so that it now queries the DNS server and gets the correct IP address of the server. /etc/hosts
的旧条目已解决了该问题,以便现在可以查询DNS服务器并获取服务器的正确IP地址。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.