Varnish VCL problem - Rails application

Seyhun Akyürek seyhunak at gmail.com
Wed Jan 29 09:08:13 CET 2014


Hi, I have some questions;

I installed and configured Varnish 3, on my Ubuntu 12.04 EC2 instance for
Rails 3.2 application. Using Devise for authentication.

But the problem is;

If I try to login via login form, all redirects doesn't work anymore. I
returns back to login after submitting. (sign_in path and 302 redirects) if
pass.

Varnish configuration:

/etc/default/varnish[https://gist.github.com/seyhunak/8664423][1]
/etc/varnish/default.vcl[https://gist.github.com/seyhunak/7943277][2]

 If I try to add this pass to, vcl_recv director, this time causes infinite
loop.

  if(req.url ~ "sign_in" || req.url ~ "sign_out" || req.request ==
"POST" || req.request == "PUT" || req.request == "DELETE") {
      return (pass);
    }

What is the workaround?


Seyhun.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140129/ad559ee2/attachment.html>


More information about the varnish-misc mailing list