【发布时间】:2014-06-10 16:11:44
【问题描述】:
我全新安装了 Slackware 64 14 位,并查看了 Varnish installation documentation 我已安装所有依赖项并编译清漆没有错误(make check 通过所有测试)
然而,当我尝试使用 varnish 运行时
varnishd -f /etc/varnish/user.vcl -s malloc,4G -T 127.0.0.1:2000
我明白了
Message from VCC-compiler:
Unknown variable 'req.grace'
At: ('input' Line 17 Pos 9)
set req.grace = 15s;
--------#########-------
Running VCC-compiler failed, exit 1
VCL compilation failed
我非常简单的/etc/varnish/ucer.vcl 文件如下所示:
vcl 4.0;
# set default backend if no server cluster specified
backend default {
.host = "127.0.0.1";
.port = "8080";
.probe = {
.url = "/";
.timeout = 34ms;
.interval = 1s;
.window = 10;
.threshold = 8;
}
}
sub vcl_recv {
set req.grace = 15s;
}
sub vcl_fetch {
set beresp.grace = 30m;
}
变量名与this example相同。
varnishd -V返回
varnishd (varnish-4.0.0 revision 2acedeb)
通过删除 sub vcl_recv 和 sub vcl_fetch(仅使用后端默认值)清漆工作正常,我可以看到它的标题,但我需要编辑 VCL 文件。
有什么想法吗?
【问题讨论】:
标签: varnish varnish-vcl