Hi Bernhard,
I think you're doing a 'double rewrite'. What works for me:
- in NGINX: do rewrite there
location / {
rewrite ^/(.*)$
/VirtualHostBase/http/$http_host:80/plonepath/VirtualHostRoot/$1;
}
location /VirtualHostBase/ {
proxy_pass http://localhost:6081; #varnish
include proxy.conf;
}
- then, in Varnish3, just:
if (req.http.host ~ "^(www.)?example.com$") {
set req.backend = myfirstbackend;
}
On 2012-01-11 10:50, boernie wrote:
> Hi,
> I've upgraded my web setup to use nginx 1.0.10, varnish 3.0.2 and plone 4
> through buildout.
> Basically the setup works, the only problem I have, is that after the login
> in plone, the first site viewed seems to be rendered from the cache without
> login information. Means I don't see the green edit bar (logged in as
> admin), and the login button is still on login, not logout. Clicking another
> page or changing the url by adding a "/" everything appears, but going back
> to the first page I have again the anonymous view.
>
> Someone has an idea how this can happen? Or someone has a working
> varnish.vcl template with 3.0 syntax?
>
> I use the following config:
> NGINX, proxy pass to varnish
> proxy_pass
> http://cache/VirtualHostBase/http/www.domain1.com:80/plonepath/VirtualHostRoot/;
>
> VARNISH, here is my vcl:
> https://viewer.zoho.com/docs/gVgcbj https://viewer.zoho.com/docs/gVgcbj
>
> I use also Plone's HTTP cache support product, but with or without there's
> no change. Even with Plone3 it's the same, so I really think the problem is
> due to varnish.
>
> Thanks for any hints,
> cheers,
> Bernhard
>
>
>
>
>
> --
> View this message in context:
> http://plone.293351.n2.nabble.com/Plone-with-varnish-3-0-first-page-login-behaviour-tp7175614p7175614.html
> Sent from the Installation, Setup, Upgrades mailing list archive at
> Nabble.com.
_______________________________________________
Setup mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-setup