[Xitami] Setting Up Virtual Hosts

WhiteShepherd xitami@lists.xitami.org
Sat, 8 Feb 2003 17:20:27 -0500


Well when setting up Xitami there are a few useful tips to know.  First a very useful 
feature is Xitami uses a hierarchy system for it's config files.  They would look like 
this:

Xitami.cfg-->defaults.cfg--->All vhost cfg's defined in defaults.cfg (virtual host1, 
virtual host 2, virtual host3)

So a rule defined in Xitami.cfg is overridden by the same rule in defaults.cfg.  
Furthermore a rule in say: vhost1.cfg (one of your vhosts defined in defaults.cfg) 
will override any setting in defaults.cfg .  However keep in mind the rules defined in 
your vhost{xx}.cfg (basically the same as found in xitami.cfg ) only apply to the 
virtual host they reference.  So you can have different vhosts with different rules.

To set up a virtual host is very simple.  In your defaults.cfg you must create a line 
called [Virtual Hosts].  Following this line should be your DNS name connections will 
be coming in on then a "=" then the cfg with the "RULES" for your vhost.

For example in your defaults.cfg it may look like this (note I am catching all 
connections with and without a www.):

[Virtual-Hosts]
www.mydomain.com=vhost1.cfg
mydomain.com=vhost1.cfg
www.myfriendsdomain.com=vhost2.cfg
myfriendsdomain.com=vhost2.cfg


Your vhost{xx}.cfg (or any name you set it) can be set up with rules from Xitami.cfg.  
Make sure you set the different web directories in you vhost{xx}.cfg files.

Example of a vhost{xx}.cfg file:

Filename vhost1.cfg (bellow is what is inside this text file)
[Server]
webpages=c:\xitami\webpages\mywebdirectory
cgi-bin=c:\xitami\cgi-bin


Filename vhost2.cfg (bellow is what is inside this text file)
[Server]
webpages=c:\xitami\webpages\myfriendswebdirectory
cgi-bin=c:\xitami\cgi-bin


Well that is about it.  It's really pretty simple once you got the hang of it.  Hopefully 
did that help or did I shoot over your head? :)

--  WhiteShepherd (www.whiteshepherd.furtopia.org)

http://www.furtopia.org / www.dragoncity.net - Unlimited fast and completely free 
hosting (CGI/perl/PHP/MySQL available) for ALL the furry arts.  Personalized 
(www."yourname".*.*) subdomains available, and/or linking to existing web pages to 
increase your traffic.  Message forums to discuss ideas and art of the week to 
peruse.  Furry Sketch-n-Guess games held online Sundays at 8PM 
(www.furtopia.org/sketch).

On 8 Feb 2003 at 12:10, Rob @ BMM wrote:

> Hi,
> 
> I have been successfully using Xitami for several months now.  Now I want to
> modify the system to run a second website.  I believe that I will have to
> begin using "virtual hosts", but after reading the instructions, not quite
> clear how to achieve this.  I understand the concept, but lack complete
> documentation to move towards this.  Can someone provide me with a brief
> summary to which config file sections and syntax to use.
> 
> 
> Best Regards,
> Rob Allen
> President, Blue Marble Meds LLC.  Offering 30-85% off Prescription Meds
> See us at http://www.BlueMarbleMeds.com
> Call us for a quote - 480-836-7232, or Toll Free 866-247-8469
> 
> 
> 
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami