Fixing backend URLs

Michael Alger varnish at
Thu Sep 30 07:07:46 CEST 2010

On Thu, Sep 30, 2010 at 11:52:11AM +0700, Dang Tung wrote:
> Are there any solutions for my issue, please help, I'm still
> waiting your reply.

I don't really have any other ideas; the code should work if it's
run, so I think you need to try to determine why the code isn't
being run. You can use varnishlog to monitor the request flow and
see if you can work it out that way. Or, you can add some debugging
statements to log messages or add headers to the response at various
points in your VCL so you can determine exactly how far Varnish is
getting, and then from that work out why it's not running the code
in question.

You might also want to see if it's possible to adjust your
application's configuration so it emits the 'correct' Location
header itself; it's generally better to configure the application to
know what its external address is rather than to rewrite things, as
rewriting the Location: header won't do anything to fix
fully-qualified URLs embedded in the HTML.

Alternatively if you're willing to attach your entire Varnish
configuration we might be able to work it out from that.

> On Mon, Sep 27, 2010 at 11:26 AM, Dang Tung <tungcnw at> wrote:
> > here is the header when I used wget:
> >
> > backend: wget -S -O /dev/null http://myaddress/admin
> >
> >  wget -S -O /dev/null http://myaddress/admin
> > --2010-09-27 11:18:35--  http://myaddress/admin
> > Connecting to myaddress:80... connected.
> > HTTP request sent, awaiting response...
> >   HTTP/1.1 302 Found
> >   Server: Apache/2.2.3 (CentOS)
> >   X-Powered-By: PHP/5.2.10
> >   Set-Cookie: symfony=lli9m9oog3flp23ggchhbt5s71; path=/
> >   Location: http://myaddress:8080/admin.php
> >   Cache-Control: max-age=0
> >   Expires: Mon, 27 Sep 2010 04:20:08 GMT
> >   Content-Type: text/html; charset=utf-8
> >   Content-Length: 106
> >   Date: Mon, 27 Sep 2010 04:18:48 GMT
> >   X-Varnish: 153748006
> >   Age: 0
> >   Via: 1.1 varnish
> >   Connection: keep-alive

More information about the varnish-misc mailing list