Varnish 5无法启动;或者vcl 5.0;在我的default.vcl
中Varnish5文档说:
从Varnish 4.0开始,每个VCL文件必须首先使用" vcl X.Y;"声明其版本。文件顶部的标记。
但我使用的是Varnish 5.1
我试过vcl 5.0;或vcl 5.1;在我的default.vcl中,但它没有工作。
答案 0 :(得分:0)
在VERSIONING下的手册页vcl(7)中解释了这一点(来自Debian 9上的Varnish 5 .0.0安装):
Multiple versions of the VCL syntax can coexist within certain
constraints.
The VCL syntax version at the start of VCL file specified with
''-f'' sets the hard limit that cannot be exceeded anywhere, and
it selects the appropriate version of the builtin VCL.
That means that you can never include "vcl 9.1;" from "vcl
8.7;", but the opposite may be possible, to the extent the com‐
piler supports it.
Files pulled in via include do not need to have a "vcl X.Y;" but
it may be a good idea to do it anyway, to not have surprises in
the future. The syntax version set in an included file only
applies to that file and any files it includes - unless these
set their own VCL syntax version.
The version of Varnish this file belongs to supports **syntax 4.0**
only.