[Zope-CMF] VHM behaving weird on items in a folder with it's ownsubdomain

Gitte Wange gitte at mmmanager.org
Wed Nov 12 03:44:14 EST 2003


Tirsdag 11 november 2003 03:05   skrev du:
> Hi Gitte,
>
> This has actually more todo with Zope and VHM than CMF
>
> Zope has no information about the domains you publish
> your content on, all information about this is in the
> apache rewrite rules.
>
> All Zope gets is an url like
> http://[IP-NUMBER]:10180/VirtualHostBase/http/sub.mydomain.com:80/www/subfo
>l der/VirtualHostRoot/folder/
>
> Zope traverses to www/subfolder/folder/
> and all Zope-generated urls (URL0, URL1 etc.)
> in this request gets http://sub.mydomain.com:80/ as a host base.
>
> ***Zope doesn't know which domain a given folder is/should be published
> on.***
>
> So the problem can't be solved only with VHM.
>
> There are other problems in a CMF scenario,
> zope gets portal root etc. from the tools in the cmf site root. These urls
> also get
> processed by VHM, that adds VrtualHostBase to all urls generated by Zope.
>
> A quick solution could be to add an objects domain to its catalog entry,
> and generate your
> own urls.
> But i dont know what other problems that might cause....

It would only cause the problem to changes a lot of code. I wouldn't mind 
doing this if I was sure that it would be the correct solution.
What  is bothering me is that it worked fine with a fresh CMF using the 
default skins - the links in the top pointed at www.mydomain.com instead of 
folder.mydomain.com
I have used the same RewriteRule so I'm a bit confused on that the differences 
are :-)

> Try to take the eksample from the Zope book and write out REQUEST - gives a
> good idea of what is
> going on.

I will try that

Greetings,
Gitte Wange

> > Hello,
> >
> > I have been trying some different setups with VHM, because I simply don't
> > understand what is happening :-)
> >
> > I created a new instance for testing purpose.
> > Here I had a CMF site and told apache to rewrite URLS so this
> > site could be
> > accessed by www.mydomain.com - that worked great!
> > Inside the CMF site I created a folder. Now I told apache to
> > rewrite urls for
> > this folder, so it could be accessed by folder.mydomain.com
> > That worked great. I had kept the defualt skins, and the urls at the top
> > (pointing to Members, News etc) had links to e.g.
>
> www.mydomain.com/Members
> (which is exactly what I wanted).
>
> Now I moved the setup to another site. But the links in the folder doesn't
> point at www.mydomain.com (as I would expect) but points to
> folder.mydomain.com (I'm not talking about the items inside the folder, but
> links to e.g. Members and so)
>
> Any idea how to prevent this?
>
> My rewrite rule looks like this:
> for www.mydomain.com:
> RewriteRule ^/(.*)
> http://IP:PORT/VirtualHostBase/http/www.mydomain.com:80/www/VirtualHostRoot
>/ $1
> [L,P]
>
> For folder.mydomain.com:
> RewriteRule ^/(.*)
> http://IP:PORT/VirtualHostBase/http/folder.mydomain.com:80/www/folder/Virtu
>a lHostRoot/$1
> [L,P]
>
> Any hints would be appreciated :-)
>
> --
> Gitte Wange
> Technical Manager
>
> Email: gitte at mmmanager.org
> Web: http://www.mmmanager.org
> Tlf: +45 36 46 20 02
>
> I'd use a list comprehension instead of a map(lambda...)
> if I thought it would get past Jim
>
>     -- Steve Alexander: Zope-Dev mailing list
>        In a patch for ZCatalog.
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests

-- 
Gitte Wange
Technical Manager

Email: gitte at mmmanager.org
Web: http://www.mmmanager.org
Tlf: +45 36 46 20 02

After 1.5 years of Python, I'm still discovering 
richness (and still unable to understand what the 
hell Jim Fulton is talking about).

    -- Gordon McMillan, 13 Mar 1998




More information about the Zope-CMF mailing list