[nginx][curl]使用curl对nginx进行的小测试

使用curl命令,模拟一个客户端的访问。有时候我们需要为hostname正确的赋值,

可以使用以下方便的技巧,而不用修改/etct/resovle.conf文件的内容。

curl -k -v https://www.classic-tong15.com/path17 --resolve www.classic-tong15.com:443:10.7.19.115

 

nginx重定向或proxy时,url变量的一般写法,见红字

location / {
return 301 https://$host$uri$is_args$args;
}

 

posted on 2020-04-04 17:35  toong  阅读(4975)  评论(0编辑  收藏  举报