On 7/16/10 17:59 , Christian Ledermann wrote:
> Hi all,
>
> My setup looks like this:
> nginx -> varnish -> zope
>
> I cannot edit the configuration for ngnix (this is managed by the
> provider). It looks like this:
> --------------
> location = / {
> proxy_pass http://localhost:123456;
> }
> -------------
>
> My varnish listens on port 123456 and does the rewrites for zope, so my
> buildout.cfg looks like:
> -------------------------
> [buildout]
> parts =
> varnishd
> varnish
>
> [varnishd]
> recipe = zc.recipe.cmmi
> url = http://downloads.sourceforge.net/varnish/varnish-2.1.2.tar.gz
>
> [varnish]
> recipe = plone.recipe.varnish
> daemon = ${buildout:parts-directory}/varnishd/sbin/varnishd
> bind = 127.0.0.1:123456
> target-port = 80 #<---- ***PATCH***
>
> backends =
> plone.org:127.0.0.1:8000
>
> zope2_vhm_map =
> plone.org:/ploneorg
>
>
> -------------------
>
> with the buildout generated vcl all links are rewritten to:
> http://plone.org:123456/
>
> which is not what i want ;)
> so i introduced a new option "target-port" which indicates to which port
> the url should be rewritten
>
> without the attached patch the vcls look like:
> -----
> set req.url =
> "/VirtualHostBase/http/plone.org:123456/site/VirtualHostRoot" req.url;
> ----
>
> and with the patch:
> -----
> set req.url = "/VirtualHostBase/http/plone.org:80/site/VirtualHostRoot"
> req.url;
> ----
>
> the diff is against plone.recipe.varnish-1.1b1
>
> Can this be integrated into the recipe?
I'ld say no. The recipe is there for very standard setups. It should not
try to accomodate every possible situation - that would make it so
complex people that you are better of writing vcl directly.
Wichert.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers