Small varnish 1.1 test with openrealty and joomla.

Dag-Erling Smørgrav des at linpro.no
Wed Aug 1 07:16:01 CEST 2007


eculp at encontacto.net writes:
> 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)"

This shows that Apache gets the correct Host: header from Varnish.

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

The log you attached shows a cache hit and is therefore useless.

> 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.

No.  The value of backend.host is *not* used for the Host: header.
However, "nuevo.ecomania.info" and "127.0.0.1" are *not* equivalent.  My
conclusion is that Apache is misconfigured; you probably have
"NameVirtualHost 189.129.5.82" instead of "NameVirtualHost *", or your
VirtualHost entry starts with "<VirtualHost nuevo.ecomania.info>"
instead of "<VirtualHost *>".

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



More information about the varnish-misc mailing list