0

I've installed Varnish on Ubuntu 12.04 x64 and want to use it with my Magento shop.

Information:

  • Magento 1.9.0.1
  • Varnish Cache 3.0.5
  • Magento Turpentine 0.6.0

I've followed the installation instructions for Magento Turpentine and point 2 reads as follows:

You'll need to make Varnish start up with the -p esi_syntax=0x2 option

Here's what my /etc/default/varnish file looks like:

# 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

When doing sudo service varnish restart I get

/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.

What's causing this and how do I solve it?

narzero
  • 175
  • 1
  • 8

1 Answers1

1

You added a new option but forgot to move the closing quotation mark to the end of the last option.

So check

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

It should look like this

DAEMON_OPTS="-a :80 \
             -T localhost:6082 \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
             -s malloc,256m \
             -p esi_syntax=0x2" # <<< Should be here
narzero
  • 175
  • 1
  • 8
Skamasle
  • 422
  • 2
  • 10