[Zope3-dev] Virtual hosting

Ivo van der Wijk ivo@amaze.nl
Tue, 11 Feb 2003 14:13:36 +0100


On Mon, Feb 10, 2003 at 10:59:09AM -0500, Gary Poster wrote:
> 
> 
> Albertas Agejevas wrote:
> > Hi all,
> > 
> > It appears that we'll be needing some kind of virtual hosting solution
> > soon.  Any strong opinions on how it should be done?
> 
> Yes, I think. :-)
> 
> > I guess a virtual host monstrosity traversal hook along the lines of
> > /++virtual++/foo.com/path/to/root/ or better yet
> > /++virtual++/path/to/root/foo.com/ would be quite appropriate.
> > 
> > Should I write a proposal for that?
> 
> Sounds great.  Once I have time I'd like to see if we can do some of the 
> more useful stuff that my old, somewhat scary VirtualHostFolder did, 
> too.  Specifically, that would be
> 
>   - allow all configuration TTW, including what domain goes to what location
> 
>   - allow extensibility of virtual host behavior
> 
>   - allow reasonably powerful domain-matching tools--I think the 
> FreeZope behavior of allowing subdomains to be used to calculate folders 
> is extremely useful for the right site, and this was something that my 
> VHF could do (I don't know if that's what FreeZope uses)
> 

FreeZope currently uses a chain of scripts and hacks to get this working.

- a wildcard DNS entry to the zopeserver
- A pythonscript accessrule that checks HTTP_HOST to figure out the virtual
  host entry, and create an appropriate VHM url, so VHM can do traversal
  modification and setting of the siteroot
- (perhaps interesting for VHM as well!) If no HTTP_HOST is available,
  and __ac_name is available, it's most likely an ftp session - rewrite
  this to the appripriate folder as well.

I've been planning to rewrite this in a more advanced VHM for a while,
but I've been lacking the time for it.

> I have some more vague thoughts on how Zope 3's features might be used. 
>   Hopefully I can participate more as you work through your proposal.
> 

Perhaps it should become a set of tools, one which does logging as well,
as proposed by others.

Cheers

	Ivo

-- 
Drs. I.R. van der Wijk                                      -=-              
Brouwersgracht 132                             Amaze Internet Services V.O.F.
1013 HA Amsterdam, NL                                       -=-              
T +31-20-4688336         F +31-20-4688337        Linux/Web/Zope/SQL/MMBase   
W http://www.amaze.nl    E info@amaze.nl             Network Solutions        
W http://vanderwijk.info E ivo@amaze.nl                 Consultancy          
PGP http://vanderwijk.info/pgp                              -=-