Hi, I have been banging my head against this too long now, I have to ask: Scenario: - Apache as frontend with ProxyPass rules - ZServer should serve a certain address, say http://www.xx.com/zopeit from a certain sub"floder" in the Zope hierarchy. Sounds easy doesn't it ? But for my life I cannot get the ProxyPass /VHM settings right. Any takers ? BTW. Is there any good documentation on VHM ? It took me a long time to figure out that VirtualHostBase is a literal and shouldn't be replaced with anything as I tried to do. Have still not figured out what VirtualHostRoot does ;-( Seems like the biggest problem for a newbie with Zope is the very rudimentary documentations on the Products (and the terminology, which is quite "different") BRGDS -- Dag Nygren email: dag@newtech.fi Oy Espoon NewTech Ab phone: +358 9 8024910 Träsktorpet 3 fax: +358 9 8024916 02360 ESBO Mobile: +358 400 426312 FINLAND
Dag On Wed, Oct 02, 2002 at 05:50:25PM +0300, Dag Nygren wrote:
BTW. Is there any good documentation on VHM ? It took me a long time to figure out that VirtualHostBase is a literal and shouldn't be replaced with anything as I tried to do. Have still not figured out what VirtualHostRoot does ;-( I've found the following page the most useful in this respect:
http://www.zope.org/Members/regebro/Zope_and_Apache
Scenario: - Apache as frontend with ProxyPass rules - ZServer should serve a certain address, say http://www.xx.com/zopeit from a certain sub"floder" in the Zope hierarchy.
Your case sounds just like ours, so here's how we do it: Let's say: - you want to serve http://www.xx.com/zopeit - inside your zope this corresponds to localhost:8080/sites/xx.com In the root of your zope you should have a VirtualHostMonster, named anything you like. In you httpd.conf, you should have: ## with all the other AddModule and LoadModule: LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/libproxy.so AddModule mod_rewrite.c AddModule mod_proxy.c ## in your virtual hosts section: <VirtualHost 66.66.66.66:80> DocumentRoot /var/www/anything-goes ServerName xx.com ServerAlias www.xx.com RewriteEngine on RewriteRule ^/zopeit/(.*)$ http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/sites/xx.com/VirtualHostRoot/$1 [L,P] </VirtualHost> That's it! - the VirtualHostBase means "please use VHM to re-write urls" - the http means use the http protocol (as opposed to https) - the %{HTTP_HOST} means use the host part of the request as the host in the rewritten urls, i.e. www.xx.com or xx.com; you could replace %{HTTP_HOST} with 'xx.com', but then www.xx.com would be re-written to xx.com - :80 means use port 80 in the re-written urls, i.e. don't show an explicit port - /sites/xx.com/VirtualHostRoot/ means the site is rooted in Zope at /sites/xx.com - $1 means pass on the path information to zope as it is, e.g. "http://xx.com/zopeit/search?fish=cod" becomes "http://localhost:8080/sites/xx.com/search?fish=cod" Hope this helps, Felix. P.S. if this doesn't scratch your itch, ask the list again, perhaps including the relevant bits of your conf files, and you'll get there.
participants (2)
-
Dag Nygren -
Felix Ulrich-Oltean