[Product-Developers] deliverance: how to use regex in path?

Nathan Van Gheem vangheem at gmail.com
Wed Sep 30 17:58:49 UTC 2009


Hi Mirto,

First off, there is a deliverance list where this email would be better
served.

I think your regex is fine.  If fact, I think you could get away will just
doing '<proxy path="/base3" ....'.   I think your problem comes from the way
you set up the virtual host monster url.  IIRC, if should be like this,
 <proxy path="regex:^/base3" class="plone-msb-base">
  <dest href="
http://localhost:4180/VirtualHostBase/http/{Host}/base3/VirtualHostRoot/<http://localhost:4180/VirtualHostBase/http/%7BHost%7D/VirtualHostRoot/base3/>"
/>
 </proxy>


Good luck,
Nathan Van Gheem

On Wed, Sep 30, 2009 at 11:06 AM, Mirto Silvio Busico <
mirtosilvio.busico at fastwebnet.it> wrote:

> Hi all,
> I'm trying to use two plone sites behind deliverance.
>
> I'm using regex in the path of the proxy directive, but it doesn't work as
> I expect. So I suppose that I'm using it in the wrong mode.
>
> The plone sites live in "http://locahost:4180/base3" and "
> http://locahost:4180/intonso"
>
> The deliverance (serving on port 4170) proxy statements are:
>
>  <proxy path="regex:^/base3" class="plone-msb-base">
>   <dest href="
> http://localhost:4180/VirtualHostBase/http/{Host}/VirtualHostRoot/base3/<http://localhost:4180/VirtualHostBase/http/%7BHost%7D/VirtualHostRoot/base3/>"
> />
>  </proxy>
>
>  <proxy path="regex:^/intonso" class="plone-msbtema1" rewrite-links="1">
>   <dest href="
> http://localhost:4180/VirtualHostBase/http/{Host}/VirtualHostRoot/intonso/<http://localhost:4180/VirtualHostBase/http/%7BHost%7D/VirtualHostRoot/intonso/>"
> />
>  </proxy>
>
> And these are the results for the various links:
>
> http://localhost:4170/base3/               works correctly
> http://localhost:4170/base3/intonso    ERROR goes to "
> http://locahost:4180/intonso" with base3 class: I expected a 404 page not
> found
> http://localhost:4170/intonso/            works correctly
> http://localhost:4170/intonso/base3   ERROR goes to "
> http://locahost:4180/base3" with intonso class: I expected a 404 page not
> found
>
> In my mind "regex:^/base3" should mean: "a path that starts with /base3" so
> "/base3/something" matches and "someting/base3" doesn't match.
> If it is so, "/base3/intonso" should match the first rule and should be
> proxied to  "http://locahost:4180/base3" that doesn' have an "intonso"
> page.
>
> What I'm doing wrong?
>
> Thanks
>   Mirto
>
>
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20090930/76d628b3/attachment.html>


More information about the Product-Developers mailing list