Varnish Cache未终止的字符串错误

时间:2016-04-15 19:07:30

标签: nginx varnish hhvm varnish-4

我一直试图在我的服务器上设置清漆缓存一小时,但我似乎无法弄清楚为什么我会收到此错误:

$ sudo varnishd -C -f /etc/default/varnish
Error:
Message from VCC-compiler:
Unterminated string at
('/etc/default/varnish' Line 21 Pos 13)
DAEMON_OPTS="-a :6081 \
------------###########

Running VCC-compiler failed, exited with 2
VCL compilation failed

我使用清洁安装清漆的默认配置。这是我的完整/ etc / default / varnish:

# Should we start varnishd at boot?  Set to "no" to disable.
START=yes

# Maximum number of open files (for ulimit -n)
NFILES=131072

# Maximum locked memory size (for ulimit -l)
# Used for locking the shared memory log in memory.  If you increase log size,
# you need to increase this number as well
MEMLOCK=82000

DAEMON_OPTS="-a :6081 \
             -T localhost:6082 \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
             -s malloc,256m"

任何帮助将不胜感激!如果您需要更多详细信息,请与我们联系。

1 个答案:

答案 0 :(得分:0)

varnishd -C is used to compile (as in C language compile) a vcl file. You only compile vcl files not the config file. Your file does not have to specifically end with a .vcl extension but it does have to be in vcl syntax: Varnish VCL documentation