[Xitami] Setting Up Virtual Hosts

Otto Haldi xitami@lists.xitami.org
Sun, 09 Feb 2003 11:41:06 +0100


Many thanks too for your help.

Only a small question. I'm using Xitami only locally to learn PHP. 
Question: how do you start the another web located on separated directory's.
Like: d:\web\ex1\index.htm
      d:\web\ex2\index.htm
      ...
      
I did the following with the help of the "Virtual hosts" template: 


This created a new file called "ex1.cfg" who look like this:
#*END

[Accesslog]
    Filename = "ex1.log"
[Security]
    Filename = "ex1.aut"
[Server]
    Webpages = "d:/web/ex1"
[Wsx]
    Admin = ""

I tried to start the page with: 
http://localhost/ex1, but do not work!

if I start with this URL: http://localhost/admin
then the admin page is loaded correctly.

What is the right way to create many web?

My defalut.cfg file look like that:
#*END
[Security]
    Filename = "defaults.aut"
[Server]
    Priority = "1"
[Virtual-hosts]
    * = "ex1.cfg"

Many thanks in advance for your help. 

Regards 

Otto

     
      


In article <3E453C5B.22650.1408066@localhost>, WhiteShepherd wrote:
> From: "WhiteShepherd" <fuzzydog@whiteshepherd.net>
> To: xitami@lists.xitami.org
> Subject: Re: [Xitami] Setting Up Virtual Hosts
> Reply-To: xitami@lists.xitami.org
> Date: 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
> 
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>