Small varnish 1.1 test with openrealty and joomla.

eculp at encontacto.net eculp at encontacto.net
Tue Jul 31 13:30:44 CEST 2007


Quoting James <james at nyi.net>:

> eculp at encontacto.net wrote:
>> I have a couple of questions:
>>
>>   1.  Is the above the best way to cache dynamically generated CMS pages?
>>
>
> I'm trying to do something similar and it seems to be the  
> recommended way to cache pages even when cookies are present.
>
>>   2.  I am running it without vhosts.  I have tried and cannot get vhosts
>>       to work.  The only thing that I've found that might work would be
>>       the vcl routines for multiple vhost backends from the vcl man page:
>>
>
> I'll let other people more experienced answer that one.

If you do happen to get Apache Vhosts running I would certainly  
appreciate your feedback on how you did it.  In my case, the only way  
it seems to work is with the example in the man vcl page:

   The following example shows how to support multiple sites running on sep-
   arate backends in the same Varnish instance, by selecting backends based
   on the request URL.

and then directing them to the vhost url which is actually the same  
backend.  Of course I may somehow be shooting myself in the foot by  
doing this, I'm just begining to test.

The default configuration for varnish has:

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

And as far as I can tell kills the the apache vhost directive by  
substituting local host for the vdomain  What I tried was to set the  
default backend to

set backend.host = req.http.host;

but the sintax is incorrect as I expected.  I need to scratch arround  
to figure out a bit about vcl.

Comments?

>
>>   3.  I'm also running eaccelerator for php.  Is that a good idea?
>>
>
> eAccelerator, or any php cache (like xcache or apc) is really a side  
> issue from Varnish. I've used all of those before with not much  
> trouble. I would recommend its usage.

It works, fine, so I see no reason to remove it for now, either.  I  
use apc  on other servers too. I'm trying to decide which I like best.

Thanks again and have a great day,

ed



More information about the varnish-misc mailing list