[En-Nut-Discussion] How to connecto to a virtual host

Jesper Hansen jesperh at telia.com
Fri Dec 23 21:16:12 CET 2005


Answer to self.....

Easy, just add a "Host: www.hostname.com" to the request headers, just 
after the GET line.
And, change the request to "HTTP/1.1" instead of "HTTP/1.0".


Merry Christmas and a Happy New Year !

/Jesper


Jesper Hansen wrote:
> 
> I was trying to download a file using HTTP from my Linux machine, which 
> has a number of domains on it.
> 
> I used NutDnsGetHostByName to pick up the IP which worked fine, then 
> used a "GET /myfile.ext HTTP/1.0" e.t.c. to get the file.
> 
> It obviously didn't work, because the IP returned by NutDnsGetHostByName 
>  will just point to the default Apache page on the Linux machine and not 
> to the one at my virtual domain on that machine, which I would normally 
> reach with "www.domain.com" in a browser.
> 
> Any hints as to how to solve this ?
> 
> 
> Merry Christmas and a Happy New Year !
> 
> /Jesper
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> 
> 



More information about the En-Nut-Discussion mailing list