[Zope-dev] strange behavior of VirtualHostMonster
zope-dev at netchan.cotse.net
zope-dev at netchan.cotse.net
Wed Feb 4 23:25:24 EST 2004
I have a zope-behind-an-apache configuration (OpenBSD 3.4, Zope2.7rc1,
python 2.3.3, apache 1.3x). Inside the zope root, there's a folder
called 'Instances', and inside this there's my custmo object (eLMS)
called 'a': /Instances/a. A beforetraverse hook is registered on 'a'.
I configured two access paths to this object in apache:
<VirtualHost 1.2.3.4:443>
RewriteRule ^/(.*)
http://127.0.0.1:8003/VirtualHostBase/https/test.server.org:443/Instance
s/a/VirtualHostRoot/$1 [L,P]
</VirtualHost>
<VirtualHost 1.2.3.4:444>
RewriteRule ^/(.*)
http://127.0.0.1:8003/VirtualHostBase/https/test.server.org:444/VirtualH
ostRoot/$1 [L,P]
</VirtualHost>
(I omitted the irrelevant parts)
The first one is the 'main entrance' directly to the 'a' object via
https://test.server.org, the other one is a 'service entrance' to the
root folder via https://test.server.org:444.
Problem: if I try to access anything via the 'main entrance', the
beforetraverse hook is called two times. Also I have strange things
inside BaseRequest.traverse, like '/' on the path.
My question: is the first rewrite rule a valid one? If not, how can I
achieve the same results with a valid one?
A debug shot from the traverse call:
> /zope/zopestable/lib/python/ZPublisher/BaseRequest.py(257)traverse()
(Pdb) path
[u'loginUser', u'usermgrFolder', '/', 'VHM'] <= this looks weird to me
(Pdb) parents
[<Application instance at 3cdb9fb0>, <Folder instance at 3cdcc8f0>,
<eLMS instance at 3cdc5260>]
(Pdb) request.get_header('PATH_INFO')
'/VirtualHostBase/https/test.elms.vanth.org:443/Instances/a/VirtualHostR
oot/'
Regards,
Sandor
More information about the Zope-Dev
mailing list