如果我在default.vcl中使用VCL5.1或VCL5.0;,则无法启动Varnish 5
Varnish5文档说:
从Varnish 4.0开始,每个VCL文件都必须以在文件顶部使用"vcl X.Y;“标记声明其版本开始。
但我使用的是Varnish 5.1
我在我的default.vcl中尝试了VCL5.0;或VCL5.1;,但它不起作用。
发布于 2017-08-19 21:12:45
这在版本控制下的手册页vcl(7)中进行了解释(来自Debian9上的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.https://stackoverflow.com/questions/44289201
复制相似问题