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?
--
Best regards,
Christian Ledermann
Nairobi - Kenya
Mobile : +254 729495789
<*)))>{
If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.
}<(((*>
75a76,80
> #override bind-port if varnish does not listen on target port
> #and the port is NOT rewritten after varnish
> self.options["target-port"] = self.options.get("target-port")
> if self.options["target-port"].isdigit():
> self.options["bind-port"] = self.options["target-port"]
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers