Reputation: 792
I have Varnish running on IP Foo with IP Bar as default backend. I visit Varnish on Foo, Apache on Bar returns a 302 and rather than a response coming from Foo, the browser is redirected to Bar, thus missing Varnish altogether.
Is there a fundamental concept of Varnish I am misunderstanding here? I've run Varnish with the exact same VCL on the same server as Apache and it worked fine.
Thanks in advance for any help/tips/pointers :-)
Upvotes: 1
Views: 3232
Reputation: 5559
You're getting a redirect (302) from your back-end. Redirects have to be absolute, and your back-end chooses to use it's own ip/hostname for the url.
You can solve this in many ways:
Location
header with foo.com)Upvotes: 3