我已经在我的生产服务器上成功运行了几个星期了。 现在我正在尝试configurationVarnish来为某些请求使用第二个后端。 我原来的工作VCL(/etc/varnish/default.vcl)是这样开始的:
后端默认{
.host =“127.0.0.1”;
.port =“8080”;
}
VCL的其余部分...
我正在改变它:
后端默认{
.host =“127.0.0.1”;
.port =“8080”;
}
后端backend2 {
.host =“12.34.56.78”;
.port =“80”;
}
VCL的其余部分...
当我重新加载VCL文件时,我得到以下内容:
Command failed with error code 106 Failed to reload /etc/varnish/default.vcl.
任何想法是什么错误,或者我怎么能得到更多的信息在这个问题上?
(注意:为了重新加载VCL,我使用这里find的脚本: http : //kristian.blog.linpro.no/2009/02/18/easy-reloading-of-varnish-vcl/ )
我没有看到这个具体的错误,但是在后台进入时,我注意到如果在configuration中没有引用后端,在我们的开发服务器上重新启动时,它给了我们一些问题。
storage_file: filename: /var/lib/varnish/devel/varnish_storage.bin size 1024 MB. Message from VCC-compiler: Unused backend default2, defined: (input Line 11 Pos 9) backend default2 { --------########-- Running VCC-compiler failed, exit 1 VCL compilation failed
那么,是否有可能没有规定引用后端?