[Setup] Proxying and bad appearance
Ross Boylan
RossBoylan at stanfordalumni.org
Sun Nov 6 06:47:17 UTC 2005
After many false starts, I have proxying setup for a Plone site. The
problem is that the site is basically text only when I look at it that
way (looks a lot as if I'm using lynx, though when I go to it directly
it look fine).
The Zope site indicates that there are some problems getting CMF skins
and other things to work with Virtual Hosts, and I wonder if this
might be the problem. However, when I try to install the latest
CMFVirtualHost package there (0.0.9) it doesn't work. The traceback
shows
File "/var/lib/zope2.8/instance/plone-site/Products/CMFVirtualHost/__init__.py", line 1, in ?
import VirtualHostTool
File "/var/lib/zope2.8/instance/plone-site/Products/CMFVirtualHost/VirtualHostTool.py", line 17, in ?
from Products.VirtualHostFolder import IHost
ImportError: No module named VirtualHostFolder
So CMFVirtualHost is trying to use the VirtualHostFolder package, but
I have installed VirtualHostMonster.
Another possible complication is that I'm not doing clean virtual
hosting. I want external clients to use http://foo.bar.com/xxx to end
up at http://localhost:7899/foo_bar. In other words, I'm mapping from
a host and a URL to my virtual site.
I'm on Debian testing.
zope2.8 2.8.3-1
zope-cmfplone 2.1-2
apache 2 config fragment (obscured)
<VirtualHost 198.200.200.200:80>
DocumentRoot /var/www/foo/
ServerName foo.bar.com
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteEngine On
RewriteRule ^/xxx/(.*) http://localhost:7899/VirtualHostBase/http/foo.bar.com:80/foo_bar/VirtualHostRoot/$1 [L,P]
RewriteRule ^/ - [L]
</VirtualHost>
I'd appreciate any hints.
Ross Boylan
P.S. The part that threw me on the rewrites was that after
/VirtualHostBase comes the apparent name of the server and the actual
internal path name. The VHM help says "If the URL contains
VirtualHostRoot, then all path elements up to that point are removed
from generated URLs. For instance, a request with path
"/a/b/c/VirtualHostRoot/d" will traverse "a/b/c/d" and then generate a
URL with path /d." I interpreted this to mean everything before
/VirtualHostRoot got tossed, which I guess is wrong.
I also discovered the need for the proxy modules and specifications
the hard way. They weren't mentioned in various how-to's.
More information about the Setup
mailing list