[Xitami] How do i run a virtual host?

Craig Morrison xitami@lists.xitami.org
Thu, 29 Nov 2001 22:15:10 -0500


Jeff Toycen wrote:
> 
> Id like to hear about them as well as I had little success myself ..
> 
> -----Original Message-----
> Subject: [Xitami] How do i run a virtual host?
> 
> OK, i'm trying to run a virtual host so that i can run two webpages off
> of
> one IP.  I can't find out how though.

The short version. :-)

If you want to run two or more virtual-hosts off of a single IP address you
are going to have to use name based v-hosts. It is really a lot more simple
than it seems.

The first thing you need to do is create a configuration file for each v-host.
The easiest way to think about the configuration for each v-host is that the
configuration file is a defaults.cfg for _each_ host. Then in your
defaults.cfg you put a pointer/reference for the v-host configuration to that
file.

I'm going to use one.domain.com and two.domain.com in this example. The
_bare_minimum_ CFG file for each v-host is below:

---one.domain.com.cfg--start--
#*END

[Server]
    Defaults=defaults.cfg
    Webpages=one
    Hostname=one.domain.com
---one.domain.com.cfg--end--

---two.domain.com.cfg--start--
#*END

[Server]
    Defaults=defaults.cfg
    Webpages=two
    Hostname=two.domain.com
---two.domain.com.cfg--end--

Then in your defaults.cfg you'll need to add the [Virtual-hosts] section (note
the spacing at the beginning of each line):

--
[Virtual-hosts]
    One.domain.com=one.domain.com.cfg
    Two.domain.com=two.domain.com.cfg
--

The web files for one.domain.com would go in \xitami\webpages\one and for
two.domain.com in \xitami\webpages\two.

You'll also want to look into creating a basehost.cfg, which can be found in
the documentation here:

  http://localhost/xitami/index8.htm

Good luck! I hope this helps.

Xitami excels at name based virtual hosting. I'm running over 25 (at last
count) here with _zero_ problems what so ever.

-- 

Craig Morrison
  MTS Professional @ http://www.mtsprofessional.com/
  A Win32 Email server that works for _you_.