Mailing List Archive

Problem with varnish
Hi

I wanted to try out varnish, so I downloaded the RHES4 rpm, and have not
had any problem installing it, but when I try to run with it, it does
not seem to cache anything.....

I am running siege from my desktop PC at 192.168.200.17 to the RHES
server on 192.168.200.93, and the apache server is on a third server at
192.168.200.91.
The /etc/varnish/default.net.vcl is like this:

backend webserver {
set backend.host = "192.168.200.91";
set backend.port = "80";
}

sub vcl_recv {
if (req.http.host ~ "") {
set req.backend = webserver;
} else {
error 404 "You requested a document from an unknown
virtual host.";
}
}

But every request seems to be sent directly on to 192.168.200.91. I am
looking at varnishstat on another console and the "Client requests
received" and "Backend connections initiated" are identical.
Am i missing something obvious ?

Best regards
Allan Jacobsen
Problem with varnish [ In reply to ]
In message <5ap9vqln.1162211911.4277360.allan at localhost>, "Allan Jacobsen" writ
es:

>sub vcl_recv {
> if (req.http.host ~ "") {
> set req.backend = webserver;

What exactly is the test for here ? That there isn't a host: header ?

In that case, try:

if (!req.http.host) {

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Problem with varnish [ In reply to ]
* Allan Jacobsen:
> I wanted to try out varnish, so I downloaded the RHES4 rpm, and have not
> had any problem installing it, but when I try to run with it, it does
> not seem to cache anything.....

There are some issues with varnish 1.0.1. A bugfix release 1.0.2 which
probably will fix at least your initial problems is in the cooking, and
will probably hit the sf mirrors "real soon".

For those who can't wait, consider building varnish from subversion, and
have a look at http://varnish.projects.linpro.no/wiki/Repository .

To build a rpm from a svn checkout, have a look at
http://varnish.projects.linpro.no/browser/trunk/varnish-cache/redhat/README.redhat

Best regards, and thanks for trying varnish,
Ingvar Hagelund

--
Problem with varnish [ In reply to ]
On Tuesday 31 October 2006 19:17, Poul-Henning Kamp wrote:
> In message <5ap9vqln.1162211911.4277360.allan at localhost>, "Allan Jacobsen"
writ
> es:
>
> >sub vcl_recv {
> > if (req.http.host ~ "") {
> > set req.backend = webserver;
>
> What exactly is the test for here ? That there isn't a host: header ?
>
> In that case, try:
>
> if (!req.http.host) {

Actually i have no idea what i am doing, it is just the default file from the
rpm package, I have just changed the backend server settings.

Best regards
Allan Jacobsen