varnishd config.
Jeff Nichols
jeff at netnichols.com
Mon Oct 22 12:24:36 CEST 2007
By default, Varnish doesn't cache any responses where cookies are
involved (in your case the php session id). There are a few messages
in the mailing list archive that explain how to override this behavior.
Jeff
On Oct 22, 2007, at 11:27 AM, Dan Deshayes wrote:
> Hello,
> I'm having som problems getting my varnish to work as i want to.
> I'm running a minimal config:
>
> backend default {
> set backend.host = "<host>";
> set backend.port = "<port>";
> }
>
> sub vcl_recv {
> if (req.request == "GET" && req.url ~ "\.(gif|png|css|js)$") {
> lookup;
> }
> }
>
> When I go to the page it starts caching all the files and on reload
> all
> the files are delivered from varnishd.
> But when i go to a certain php on the page it forwards every
> request to
> apache and when going back to one of the former working tabs they
> also go
>
> I put a few expire-lines in my virtualhost-config:
> ExpiresActive On
> ExpiresByType image/gif "access plus 3 hours"
> and so on, but it won't work.
>
> Here are two examples of the headers tx:ed and rx:ed:
> http://www.nangilima.se/varnishd/working.txt
> http://www.nangilima.se/varnishd/nonworking.txt
>
> I've noticed that in the working example apache provides last-modified
> and a few other things in the response, but why doesn't it do that in
> the nonworking?
> Its the same virtualhost with all the same settings but
> another .php file.
> I'm always using fully reload when testing so the browsers cache
> doesn't
> lead me astray.
>
> Thanks in advance
> Regards Dan
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>
More information about the varnish-misc
mailing list