Small varnish 1.1 test with openrealty and joomla.

eculp at encontacto.net eculp at encontacto.net
Wed Aug 1 00:19:19 CEST 2007


Quoting Dag-Erling Smørgrav <des at linpro.no>:

> eculp at encontacto.net writes:
>> Quoting Dag-Erling Smørgrav <des at linpro.no>:
>> > Is Varnish passing the correct Host: header to Apache?
>> AFAIK, it is passing what I am/was telling it in default.vcl.
>
> I'm not asking you to guess or speculate; I'm asking you to check your
> logs.  Varnish does *not* use backend.host for the Host: header, it uses
> whatever it got from the client.



This is from the apache log:

127.0.0.1 - - [31/Jul/2007:16:33:22 -0500] "GET /favicon.ico HTTP/1.1"  
404 209 "http://nuevo.ecomania.info/" "Opera/9.22 (X11; Linux i686; U;  
en)"

and displays the index in the root directory under which are all the  
virtual hosts such as nuevo.encomania.info.

The varnishlog -r /var/log/varnish.log is attached (4k) and again my  
interpretation is the same.

If I change the default

backend default {
   set backend.host = "127.0.0.1";
   set backend.port = "8080";
}

to

backend nuevo {
         set backend.host = "nuevo.ecomania.info";
         set backend.port = "8080";
}

with all else the same, it works as expected because  
http://nuevo.ecomania.info is configured as an apache vhost.  It also  
works for this one site if I DO NOT configure virtual hosts.  Maybe  
I'm barking up the wrong tree again.  If so, I apologize.  There is  
still a lot that i don't understand.

Thanks again for your help,

ed
.
>
> DES
> --
> Dag-Erling Smørgrav
> Senior Software Developer
> Linpro AS - www.linpro.no
>

-------------- next part --------------
    0 CLI            Rd ping
    0 CLI            Wr 0 200 PONG 1185919372
    0 CLI            Rd ping
    0 CLI            Wr 0 200 PONG 1185919375
   15 SessionOpen  c 189.129.12.64 59655
   15 Debug        c "/#nuevo.ecomania.info#"
   15 ReqStart     c 189.129.12.64 59655 1115880254
   15 RxRequest    c GET
   15 RxURL        c /
   15 RxProtocol   c HTTP/1.1
   15 RxHeader     c User-Agent: Opera/9.22 (X11; Linux i686; U; en)
   15 RxHeader     c Host: nuevo.ecomania.info
   15 RxHeader     c Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
   15 RxHeader     c Accept-Language: es,en;q=0.9
   15 RxHeader     c Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
   15 RxHeader     c Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
   15 RxHeader     c Cookie: __utma=233483905.1461977794.1185903227.1185903227.1185903227.1; __utmc=233483905; __utmz=233483905.1185903227.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utma=108653974.1335907909.1185903226.1185903226.1185903226.1; __utmc=108653974; __ut
   15 RxHeader     c Cookie2: $Version=1
   15 RxHeader     c Cache-Control: no-cache
   15 RxHeader     c Connection: Keep-Alive, TE
   15 RxHeader     c TE: deflate, gzip, chunked, identity, trailers
   15 VCL_call     c recv
   15 VCL_return   c lookup
   15 VCL_call     c hash
   15 VCL_return   c hash
   15 Hit          c 1115880252
   15 VCL_call     c hit
   15 VCL_return   c deliver
   15 Length       c 2187
   15 VCL_call     c deliver
   15 VCL_return   c deliver
   15 TxProtocol   c HTTP/1.1
   15 TxStatus     c 200
   15 TxResponse   c OK
   15 TxHeader     c Date: Tue, 31 Jul 2007 22:01:00 GMT
   15 TxHeader     c Server: Apache/2.2.4 (FreeBSD) mod_ssl/2.2.4 OpenSSL/0.9.8e DAV/2 PHP/5.2.3 with Suhosin-Patch
   15 TxHeader     c Content-Type: text/html
   15 TxHeader     c Content-Length: 2187
   15 TxHeader     c X-Varnish: 1115880254 1115880252
   15 TxHeader     c Age: 118
   15 TxHeader     c Via: 1.1 varnish
   15 TxHeader     c Connection: keep-alive
   15 ReqEnd       c 1115880254 1185919378.468985558 1185919378.469070435 0.084838629 0.000037909 0.000046968
    0 StatAddr       189.129.12.64 0 1776 4 7 0 0 4 2021 9375
   15 Debug        c "/favicon.ico#nuevo.ecomania.info#"
   15 ReqStart     c 189.129.12.64 59655 1115880255
   15 RxRequest    c GET
   15 RxURL        c /favicon.ico
   15 RxProtocol   c HTTP/1.1
   15 RxHeader     c User-Agent: Opera/9.22 (X11; Linux i686; U; en)
   15 RxHeader     c Host: nuevo.ecomania.info
   15 RxHeader     c Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
   15 RxHeader     c Accept-Language: es,en;q=0.9
   15 RxHeader     c Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
   15 RxHeader     c Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
   15 RxHeader     c Referer: http://nuevo.ecomania.info/
   15 RxHeader     c Cache-Control: no-cache
   15 RxHeader     c Connection: Keep-Alive, TE
   15 RxHeader     c TE: deflate, gzip, chunked, identity, trailers
   15 VCL_call     c recv
   15 VCL_return   c lookup
   15 VCL_call     c hash
   15 VCL_return   c hash
   15 Hit          c 1115880253
   15 VCL_call     c hit
   15 VCL_return   c deliver
   15 Length       c 209
   15 VCL_call     c deliver
   15 VCL_return   c deliver
   15 TxProtocol   c HTTP/1.1
   15 TxStatus     c 404
   15 TxResponse   c Not Found
   15 TxHeader     c Date: Tue, 31 Jul 2007 22:01:00 GMT
   15 TxHeader     c Server: Apache/2.2.4 (FreeBSD) mod_ssl/2.2.4 OpenSSL/0.9.8e DAV/2 PHP/5.2.3 with Suhosin-Patch
   15 TxHeader     c Content-Type: text/html; charset=iso-8859-1
   15 TxHeader     c Content-Length: 209
   15 TxHeader     c X-Varnish: 1115880255 1115880253
   15 TxHeader     c Age: 118
   15 TxHeader     c Via: 1.1 varnish
   15 TxHeader     c Connection: keep-alive
   15 ReqEnd       c 1115880255 1185919378.646611929 1185919378.646687508 0.177541494 0.000034094 0.000041485
    0 StatAddr       189.129.12.64 0 1776 4 8 0 0 4 2332 9584
    0 CLI            Rd ping
    0 CLI            Wr 0 200 PONG 1185919378
    0 CLI            Rd ping
    0 CLI            Wr 0 200 PONG 1185919381
   15 SessionClose c timeout
   15 StatSess     c 189.129.12.64 59655 nan 1 2 0 0 0 596 2396
    0 CLI            Rd ping
    0 CLI            Wr 0 200 PONG 1185919384
    0 CLI            Rd ping
    0 CLI            Wr 0 200 PONG 1185919387
    0 CLI            Rd ping
    0 CLI            Wr 0 200 PONG 1185919390


More information about the varnish-misc mailing list