Use cURL to test local virtual hosts configuration – via: Stack Overflow
Posted by jpluimers on 2016/06/14
Quoting John Hart‘s brilliant answer:
Using
--resolveleverages all of the normal logic that applies, but simply pretends the DNS lookup returned the data in your command-line option. It works just like/etc/hostsshould.Note
--resolvetakes a port number, so for HTTPS you would useHttps:
curl --resolve 'yada.com:443:127.0.0.1' https://yada.com/somethingHttp:
curl --resolve 'yada.com:80:127.0.0.1' http://yada.com/something
It requires curl 7.21.3 or higher (from the end of 2010). Which by now everybody should have.
–jeroen
more via: Set cURL to use local virtual hosts – Stack Overflow.






Leave a comment