[Zope] Apache Rewrite w/o VHM

Oliver Marx oliver@tekk.dk
Tue, 6 Aug 2002 23:00:38 +0200


One VHM in zope root.
Then just use RewriteCond together with RewriteRule to direct your traffic.
If you want to use SSL then you must use VirtualHost to split up https and
http reguests.

http://httpd.apache.org/docs/mod/mod_rewrite.html
http://httpd.apache.org/docs/vhosts/index.html

Pay attention to REQUEST_URI
It is your special friend :)

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/section_served_by_zope/(.*)$
RewriteRule ^/(.*)
http://127.0.0.1:8080/VirtualHostBase/http/www.mysite.com:80/VirtualHostRoot
/$1 [P]

This should help you on your the way.

\Oliver



>>-----Original Message-----
>>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jim
>>Kutter
>>Sent: 6. august 2002 22:11
>>To: zope@zope.org
>>Subject: [Zope] Apache Rewrite w/o VHM
>>
>>
>>Almost NOBODY seems to cover this little problem I'm having.
>>
>>I have a massive site, that must be migrated picemeal to zope. I
>>would like to create virtual urls that pass into zope. I do not
>>want to use virtual host in apache, nor do I want to use
>>proxypass because of problems I've ran into with that.
>>
>>example
>>
>>www.mysite.com -> served by apache
>>www.mysite.com/section_in_zope -> served by zope
>>www.mysite.com/other_section_in_zope  -> served by zope
>>
>>if I setup a proxypass so that /section_in_zope/ goes to
>>www.mysite.com:8080/section_in_zope (which works), all my links
>>(file.html) now go to
>>www.mysite.com:8080/section_in_zope/file.html. So i set a
>>siteroot for section_in_zope, with base
http://www.mysite.com/section_in_zope/ and base /section_in_zope/. The
problem with that is now the link file.html goes to
http://www.mysite.com/section_in_zope/section_in_zope/file.html and it grows
with each new link.

So basically I suspect rewrite will be my answer. How would I go about
setting up both apache and zope to do that?

-jim


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 02-08-2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 02-08-2002