Cannot compile vcl

duja at torlen.net duja at torlen.net
Wed Sep 24 11:40:24 CEST 2008


Hi,

Im having problem compiling the following VCL on varnish-2.0-tp2:
[VCL]
backend child_1 {
        .host = "192.168.0.192";
        .port = "80";
}

backend child_2 {
        .host = "192.168.0.193";
        .port = "80";
}


director www_director random {
        {
          .backend = child_1;
          .weight = 1;
        }

        {
          .backend = child_2;
          .weight = 2;
        }

}

sub vcl_recv {

        req.backend = www_director;

        # Cacha endast filer av denna filtyp
        # *.jpg , *.jpeg , *.gif , *.png, *.js , *.css , *.swf
        if (req.url ~ "\.(jpg|gif|png|js|css|swf)$") {
                lookup;
        }

        pass;

} #RECV

sub vcl_fetch {

        # Cacha endast filer av denna filtyp
        # *.jpg , *.jpeg , *.gif , *.png, *.js , *.css , *.swf
        if (req.url ~ "\.(jpg|gif|png|js|css|swf)$") {
                set obj.ttl = 1h;

                insert;
        }

        pass;

} #FETCH
[/VCL]

Im getting the following error:

Starting Varnish: varnishmgt_child_inherit(3, storage_file)
Expected action, 'if' or '}'
(/usr/local/etc/main.vcl Line 27 Pos 9)
        req.backend = www_director;
--------###########----------------

VCL compilation failed

I tried using probing in one of the backends but that gave me an error to :/

/ E




More information about the varnish-misc mailing list