Re: [Zope] help with url rewriting
(Wed, Nov 09, 2005 at 10:41:32AM -0500) zope-request@zope.org wrote/schrieb/egrapse:
From: Faheem Mitha <faheem@email.unc.edu> ... I running Apache 2.0 and Zope 2.7 on Debian Sarge. I've configured a zope (Plone) instance located /var/lib/zope2.7/instance/dulci.
This can be accessed via http://machine_address:9673/dulci. 9673 is the ^^ http
point on which Zope runs on Debian.
I'm trying to configure Apache so that all requests of the form
http://machine_address/plone are sent to
https://machine_address:9673/dulci ^^ https
http != https Zope is unlikely to understand the rewritten URL with that https I would say. I don't understand why you try to access Zope with SSL/https, plain Zope does not understand that protocol. If you try to use apache to do SSL for Zope, you will need it the other way around. And to force connections to go through SSL, you will need a rewriterule to redirect (either for all URLs or for /manage URLs) or some fancier Plone setup (which I never figured out).
and that the urls returned by Plone are consistent.
I added the following lines to my Apache config, representing my best guess as to how this should work.
I don't know about the problems that Chris found with your RewriteRule, but I stopped worrying, since I can always go to the witch and get a usefull RewriteRule for most setups (if I might say so myself :-) http://betabug.ch/zope/witch
The rewriting seems to work, since when I go to
the log says
[Wed Nov 09 03:30:26 2005] [error] [client ...] client denied by server configuration: proxy:http://127.0.0.1:9673/VirtualHostBase/https/machine_address:443/dulci/Virtua...
However, something must be broken.
...
RewriteRule ^/plone(/.*)?$ http://127.0.0.1:9673/VirtualHostBase/https/%{HTTP_HOST}:443/dulci/VirtualHostRoot/_vh_plone$1 [L,P]
As for the question mark, I guess you are trying to get in one rule what most people (and the witch) do in two rules: Cover the case where "/plone" ends the URL, as well the case where something comes behind "/plone". Regular expressions are tricky with that stuff, so it's better to use 2 rules and be covered. Googling for [zope apache rewriterule], the ZopeWiki page (http://zopewiki.org/ZopeAndApache) comes on the first result page, while the witch is currently on the second page. The help page from the VHM is also very informative. Regards, Sascha
participants (1)
-
Sascha Welter