Realizing vhosts with varnish

Stefan Pommerening pom at dmsp.de
Thu Dec 16 18:41:52 CET 2010


Ok, very good statement - normally I know the override mechanism used by 
the custom VCL.
Nevertheless my last email was incorrect - sorry for that.

But: What happens when you include a vcl_recv INSIDE another vcl_recv 
subroutine?
This is what Frank did.

Stefan
--
http://dmsp.de

Am 16.12.2010 17:59, schrieb Per Buer:
> On Thu, Dec 16, 2010 at 2:30 PM, Stefan Pommerening <pom at dmsp.de 
> <mailto:pom at dmsp.de>> wrote:
>
>
>     of couse you only need one single vcl_recv subroutine. This
>     applies to all vcl subroutines.
>     I usually start with grabbing the default vcl and then add
>     everything I need to the existing (default) subroutines.
>
>     If you use the include statement you have to keep in mind that
>     inclusion is a textual
>     substitution - therefore no repeated definition of vcl_recv (or
>     even other subroutines)
>     is allowed.
>
>
> Actually, multiple definitions of the same subroutine is allowed. They 
> are then concatenated, the flow being terminated only by the return 
> statements. This is how the default VCL get overridden by your custom 
> VCL.
>
> There is a good example in the man vcl. Of course, this might get very 
> confusing when you have multiple vcl_recv subroutines spread over 
> several included files. Caution advised. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101216/b846b177/attachment.html>


More information about the varnish-misc mailing list