curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.报错

[root@localhost ~]# curl https://pre.bjy****.com/wec****-server/
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.

curl https 网站 出现报错 

解决办法:

You can use the domain name as usual but override the resolver like so:

curl -v --resolve subdomain.example.com:443:x.x.x.x https://subdomain.example.com/

It might be awkward to maintain a lot of such mappings though. You might prefer to just ignore the cert mismatch:

curl --insecure https://subdomain.example.com/
posted @ 2018-03-16 16:03  Oops!#  阅读(29098)  评论(0编辑  收藏  举报