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/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM