【问题标题】:Nginx cookbook v 2.0.0: Cookbook http_gzip_static_module not foundNginx 食谱 v 2.0.0:未找到食谱 http_gzip_static_module
【发布时间】:2013-11-07 00:14:29
【问题描述】:

我正在使用 berkshelf 管理食谱、厨师 11.6.2 和 nginx 食谱 v 2.0.0

我从源代码编译 nginx 的设置:

set[:nginx][:source][:modules] = ["http_gzip_static_module", "http_ssl_module"]

配置给了我错误:

Cookbook http_gzip_static_module not found. If you're loading http_gzip_static_module from another cookbook, make sure you configure the dependency in your metadata

这是 nginx 食谱中的一个错误,你如何解决它?一切都适用于 nginx 食谱 v 1.7.0

非常感谢。

【问题讨论】:

    标签: deployment nginx chef-infra cookbook berkshelf


    【解决方案1】:

    nginx 食谱版本已增加到 2.0.0,以强调重大更改。特别是现在您应该指定所有带有 nginx:: 前缀的模块,并且根本不要使用 extra_modules。所以,它现在应该是这样的:

    "default_attributes": {
        "nginx": {
          "source": {
            "modules": [
              "nginx::http_gzip_static_module", "nginx::http_ssl_module",
              "nginx::http_realip_module", "nginx::http_stub_status_module",
              "nginx::upload_progress_module"]
            }
        }
    }
    

    详情请查看此ticket 和相关changeset

    【讨论】:

    • 嗨,迈克,非常感谢您的回答,我会尝试一下,很快就会回来。
    猜你喜欢
    • 1970-01-01
    • 2018-03-20
    • 2016-04-26
    • 2021-11-01
    • 2015-01-14
    • 2015-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多