【问题标题】:Programmatically get Turpentine to apply VCL to Varnish from the commandline以编程方式让 Turpentine 从命令行将 VTL 应用于 Varnish
【发布时间】:2016-04-04 17:25:52
【问题描述】:

我正在使用 Ansible 部署服务器。我想让 Turpentine 从命令行应用 VCL,这样当我第一次访问新服务器时,它已经在为该环境使用正确编译的 VCL。

【问题讨论】:

    标签: ansible varnish varnish-vcl


    【解决方案1】:

    运行类似php ~/applyvcl.php的命令

    在php文件中:

    <?php
    require_once '/path/to/magento/app/Mage.php';
    Mage::app('admin');
    $res = Nexcessnet_Turpentine_Model_Varnish_Admin::applyConfig();
    var_dump($res);     
    ?>
    

    您应该会从中看到成功消息。

    【讨论】:

      猜你喜欢
      • 2014-06-08
      • 1970-01-01
      • 2016-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-25
      相关资源
      最近更新 更多