Hugo Ramos wrote:

> After testing SiteAccess for about 100 times... i still can't get zope to
> serve multiple virtual hosts and domains...
> I would like very much that someone with a successful siteaccess instalation
> in a real production site could get in touch with me and try to get this
> working.

I just recently asked this question and got it to work.  This setup
works if you have several subdomains 'sitea.domain.tld' and
'siteb.domain.tld' etc.  It may have to be modified to work with other
setups - don't ask me how!

-  create folders sitea, siteb, and so on in your root zodb directory
-  put a siteroot in each folder, leaving all fields except name blank
-  make a dtml method in the root directory called virtual_hosts or
something, consisting of the following script:
Get subdomain:
'.')[0], '')">
Is there a folder named as this subdomain?
     <dtml-if "[hostname]">
        Set logical root: 
                <dtml-call "REQUEST.set('SiteRootPATH', '/')">
        Add physical root: 
                <dtml-call "REQUEST.path.append(hostname)">   
   <dtml-except KeyError>
-  Create a Site Access Rule in the root folder and have it call this
This should work, but don't ask me how (credit goes to Ethan Mindlace
Freeman, who gave me these instructions).  Good luck!
Building highways to reduce traffic is like 
loosening your belt to reduce obesity.

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to