Ren*_*aro 7 varnish varnish-vcl
我有一个全新的Slackware 64 14bit安装,并通过Varnish安装文档查看我安装了所有依赖项并编译了varnish而没有错误(make check通过所有测试)
然而,当我尝试使用清漆时
varnishd -f /etc/varnish/user.vcl -s malloc,4G -T 127.0.0.1:2000
Run Code Online (Sandbox Code Playgroud)
我明白了
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
Run Code Online (Sandbox Code Playgroud)
我非常简单的/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;
}
Run Code Online (Sandbox Code Playgroud)
变量名称与此示例相同.
varnishd -V 回报
varnishd (varnish-4.0.0 revision 2acedeb)
Run Code Online (Sandbox Code Playgroud)
通过删除sub vcl_recv和sub vcl_fetch(仅使用后端默认值)varnish工作正常,我可以看到它的标题,但我需要编辑VCL文件.
有任何想法吗?
小智 10
您正在使用Varnish 4.0.0,它需要从您的VCL代码所基于的3.0格式进行更新.
req.grace消失了(你通常不需要它),现在vcl_fetch被称为vcl_backend_response.
请参阅升级文档:https://www.varnish-cache.org/docs/trunk/whats-new/upgrading.html
| 归档时间: |
|
| 查看次数: |
6209 次 |
| 最近记录: |