【问题标题】:Magento, Plesk and VarnishMagento、Plesk 和 Varnish
【发布时间】:2017-07-11 11:29:53
【问题描述】:

我正在运行以下设置:

  1. Magento 1.9.3.1
  2. Varnish 3.0.5-2 - 从这里安装的软件包https://www.magentocommerce.com/magento-connect/turpentine-varnish-cache.html
  3. Ubuntu 14.04
  4. Plesk 17.0.17

我已经在服务器上安装了 varnish 和 magento 中的插件,正确保存了配置(来自 magento 管理员),但是由于 Varnish 标头没有显示,所以我在某处缺少配置设置。

/etc/default/varnish有以下内容:

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"

我确实将它设置为在 443 上收听,因为该网站具有 ssl 证书。

当我尝试使用 netstat -ntlp | grep -w 443 查看谁在收听 443 时,我得到以下响应:

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

因此,除此之外,我还尝试通过将侦听端口设置为 444 来修改 nginx 侦听的端口,例如 listen 444 ssl;。它没有用。

当我尝试查看带有 curl 的标头时,没有 X-Varnish 标头。

我错过了什么?

【问题讨论】:

  • 使用 Varnish 4 而没有 Plesk。没有或几乎没有任何控制面板与 Varnish 兼容。
  • @DanielV。强有力的主张需要证据。清漆总是需要特别注意,所以也许要放弃清漆?
  • @DanielV。我知道了。谢谢
  • @OlegNeumyvakin,确保您应该放弃 Varnish 并专注于使用 Plesk 托管越来越多的客户,这些客户永远不会看到真实世界的流量 :)

标签: magento ssl varnish plesk


【解决方案1】:
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"

你应该把监听 nginxapache 的端口改为 8080 并配置 default.vcl 更改端口 backend 8080

【讨论】:

    猜你喜欢
    • 2021-10-16
    • 1970-01-01
    • 2015-08-23
    • 1970-01-01
    • 2017-11-21
    • 1970-01-01
    • 1970-01-01
    • 2012-05-26
    • 2021-03-19
    相关资源
    最近更新 更多