清漆:/etc/init.d/varnish:50:/etc/default/varnish:-p:未找到

清漆:/etc/init.d/varnish:50:/etc/default/varnish:-p:未找到

我已经在 Ubuntu 12.04 x64 上安装了 Varnish,并想将它与我的 Magento 商店一起使用。

信息:

  • Magento 1.9.0.1
  • Varnish 缓存 3.0.5
  • Magento 松节油 0.6.0

我已经关注安装说明对于 Magento Turpentine,它说

你需要使用以下命令启动 Varnish:-p esi_syntax=0x2 option

/etc/default/varnish我的文件如下所示:

# Configuration file for varnish

START=yes

NFILES=131072

MEMLOCK=82000

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

sudo service varnish restart我这样做时

/etc/init.d/varnish: 50: /etc/default/varnish: -p: not found
/etc/init.d/varnish: 50: /etc/default/varnish: -p: not found
 * Stopping HTTP accelerator varnishd
   ...done.
/etc/init.d/varnish: 50: /etc/default/varnish: -p: not found
 * Starting HTTP accelerator varnishd
   ...done.

是什么原因造成的?如何解决?

答案1

问题在于:

-s malloc,256m" \
-p esi_syntax=0x2

您需要将其更改为:

-s malloc,256m \
-p esi_syntax=0x2"

相关内容