[Zope] inside-out virtual hosting?

Ian MacColl ianm at itee.uq.edu.au
Mon Nov 1 01:10:12 EST 2004


[previously sent to plone-users so apologies for any duplicates]

Hello:

I'm using Plone 2.0.4 from the OSX installer, running behind the  
default OSX Apache (1.3.29), on MacOSX 10.3.5.

I'm trying to use inside-out virtual hosting as shown at the end of

	http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ 
VirtualHosting.stx

and at

	http://www.cheimes.de/opensource/docs/zope-apache2/zope-apache2-4

with a rewrite rule like

	^/foo/(.*)  
http://localhost:8400/VirtualHostBase/http/www.example.org:80/ 
VirtualHostRoot/_vh_foo/$1 [L,P]

The redirection works fine, but the _vh_ insertion of foo into  
generated URLs doesn't happen. For example, the generated news and  
members links are like

	http://www.example.org/news
	http://www.example.org/members

rather than the expected

	http://www.example.org/foo/news
	http://www.example.org/foo/members

I have a separate rewrite rule to redirect non-foo URLs to a default  
plone instance:

	^/(.*)  
http://localhost:8200/VirtualHostBase/http/www.example.org:80/ 
VirtualHostRoot/$1 [L,P]

I think this is being invoked for URLs generated for the foo (port  
8400) instance, which seems to be confirmed by the second and  
subsequent entries in the rewrite log (with first entry also shown  
below)

203.122.227.35 - - [20/Oct/2004:07:35:19 +1000]  
[www.example.org/sid#828228][rid#836e38/initial] (1) go-ahead with  
proxy request  
proxy:http://localhost:8400/VirtualHostBase/http/www.example.org:80/ 
VirtualHostRoot/_vh_foo/ [OK]
203.122.227.35 - - [20/Oct/2004:07:35:19 +1000]  
[www.example.org/sid#828228][rid#836e38/initial] (1) go-ahead with  
proxy request  
proxy:http://localhost:8200/VirtualHostBase/http/www.example.org:80/ 
VirtualHostRoot/ploneNS4.css [OK]
...

I have a VirtualHostMonster in each of the plone instances, but I  
haven't messed with the auto-generated SiteRoot objects or access_rule  
scripts.

Shutting down the site on port 8200 or commenting out the rewrite rule  
for port 8200 results in the foo site on port 8400 displaying just the  
bare content (no graphics or CSS).

If I access the port 8400 site directly (via an ssh tunnel), generated  
URLs are correct.

I think this means _vh_foo is not inserting foo into generated URLs as  
I expect.

What am I missing? Should I mess with the SiteRoot objects and  
access_rule scripts?

thanks

Ian



More information about the Zope mailing list