in reply to Re: Get data via HTTP on IP and specify virtual host
in thread Get data via HTTP on IP and specify virtual host

That is quite interesting, Anonymous.   Would you, or someone else, please elaborate on this?

Replies are listed 'Best First'.
Re^3: Get data via HTTP on IP and specify virtual host
by Corion (Patriarch) on Feb 28, 2012 at 20:39 UTC

    Look in RFC 2616, for the Host: header. It's what makes multiple websites live on the same IP address/port combination.

      But the server side still needs to have some sort of config (e.g. the httpd.conf file) to process the "host" name in the header and point it to the right vhost. It doesn't need to be in the /etc/hosts, but there has to be some sort of incoming route handling.

        /etc/hosts (or DNS) does not come into play at all. Again, see RFC 2616 for how a webserver can determine which host ("website") was meant by the client.

        As the original post mentions in the title "virtual host", I would assume that the web server already is configured to serve multiple websites under the same IP address (and port).