comotion / security.vcl

protect your websites with varnish rules
GNU General Public License v2.0
193 stars 39 forks source link

VCL error in Varnish 3.0: Expected ';' got 'client.ip' #5

Closed Yggdrasil closed 13 years ago

Yggdrasil commented 13 years ago

On a fresh installation of Varnish 3.0 and security.vcl I get the following error when trying to start Varnish. This is right after adding the include line to default.vcl.

 * Starting HTTP accelerator varnishd    [fail] 
SMA.s0: max size 256 MB.
Message from VCC-compiler:
Expected ';' got 'client.ip'
(program line 174), at
('/etc/varnish/security/main.vcl' Line 36 Pos 36)
   set req.http.X-SEC-Client = "[" client.ip "] "
-----------------------------------#########-----

Running VCC-compiler failed, exit 1

VCL compilation failed

My default.vcl is completely empty, except for:

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

include "/etc/varnish/security/main.vcl";

make completed without errors, and I'm not sure what could be wrong. Any thoughts?

comotion commented 13 years ago

yup, varnish 3.0 is not supported in this release

however, I have ported security.vcl to varnish 3.0, which promises some new features down the line too :-)

check out 9706113f8c2d2400876d and let me know how it goes

comotion commented 13 years ago

that is, if you pull the latest release of security.vcl, it supports varnish 3.0 but no longer works on versions lower than 3.0.

Yggdrasil commented 13 years ago

Sorry for the late reply. I was on vacation.

I've just updated to 9706113f8 which seems to work fine so far. Thanks for keeping me updated!