curl 指定host ip 访问页面或接口

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011944141/article/details/81167620

服务器太多了,查找错误的时候又想指定机器且快速访问,去查看错误日志,怎么办呢?
使用curl的解决方式:

curl -H 'Host:www.test.com' http://10.44.54.111/test.php
或
curl -x 10.44.54.111:80 http://www.test.com/test.php

猜你喜欢

转载自blog.csdn.net/u011944141/article/details/81167620