curl 带host访问两种方式

curl --silent -H "Host: www.xxxx.com"  "hostname/xxxx/xxxx.htm"

这种方式与windows中更改hosts文件,指定域名对应用的具体host的ip是一样的,

curl http://ww.xxxx.com/xxxx/xxxx.htm -xhostname:80

与上面的方式区别不是很大.

猜你喜欢

转载自hugoren.iteye.com/blog/2241283