2
votes

I am running the following setup:

  1. Magento 1.9.3.1
  2. Varnish 3.0.5-2 - package installed from here https://www.magentocommerce.com/magento-connect/turpentine-varnish-cache.html
  3. Ubuntu 14.04
  4. Plesk 17.0.17

I have installed both varnish on the server and the plugin within magento, saved the configuration properly (from magento admin), however I am missing a configuration setting somewhere since the Varnish headers do not show up.

/etc/default/varnish has the following content:

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

I did set it up to listen on 443 because the website has a ssl certificate.

When I try to see who is listening 443 with netstat -ntlp | grep -w 443 I get the following response:

tcp        0      0 91.250.103.173:443      0.0.0.0:*               LISTEN      9171/nginx: worker
tcp6       0      0 :::443                  :::*                    LISTEN      6109/varnishd

So in addition to this I tried to modify the port where nginx listens by setting the listening port to 444 like this listen 444 ssl;. It did not work.

When I try to see the headers with curl there is no X-Varnish header.

What am I missing?

1
Use Varnish 4 and no Plesk. None or mostly none of the control panels out there would be compatible with Varnish. - Danila Vershinin
@DanielV. Strong claims require evidence. Varnish always requires an exceptional attention, so maybe to drop varnish? - Oleg Neumyvakin
@DanielV. I see. Thank you - Mike
@OlegNeumyvakin, sure you should drop Varnish and concentrate on hosting more and more clients using Plesk for sites that would never see real world traffic :) - Danila Vershinin

1 Answers

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

you should change port listen to nginx or apache to 8080 and config default.vcl change port backend 8080