红联Linux门户
Linux帮助

wget下载https文件,服务器可以虚拟机中不行的问题

发布时间:2016-07-25 15:55:04来源:linux网站作者:atwal
用wget下载一个图片资源(https协议),在服务器上可以,但在本机的虚拟机中卡在下面这里了:
 
[root@localhost ~]# wget 'https://gp1.wac.edgecastcdn.net/806614/photos/photos.500px.net/90241693/795b7a5900db5905631ebe7ff5aa141a5e0f59ce/3.jpg?v=6'
--2016-07-25 09:33:17--  https://gp1.wac.edgecastcdn.net/806614/photos/photos.500px.net/90241693/795b7a5900db5905631ebe7ff5aa141a5e0f59ce/3.jpg?v=6
Resolving gp1.wac.edgecastcdn.net... 159.106.121.75, 37.61.54.158 Connecting to gp1.wac.edgecastcdn.net|159.106.121.75|:443... failed: Connection timed out. Connecting to gp1.wac.edgecastcdn.net|37.61.54.158|:443... connected.
 
最后发现是DNS的问题,把域名改为IP就可以了。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/22703.html