Let’s say you want to access http://luckymarmot.com/paw
on Server A, and the domain name luckymarmot.com
is pointing to Server B (not Server A). Then, what you need is to connect to Server A while sending an HTTP Header Host: luckymarmot.com
.
In fact, many web servers have the notion of virtual hosts or server blocks (Apache Virtual Hosts, Nginx Server Blocks), so when a request is handled, the response will depend on the HTTP Host
header.
Most, if not all, web browsers and HTTP libraries automatically set that header for you depending on the URL you’ve set (if URL is http://echo.luckymarmot.com/test
, host will be echo.luckymarmot.com
). Of course Paw sends it automatically too, but you have the ability to override it.