donglin6109 2014-08-20 09:41
浏览 38
已采纳

如何在厨师食谱中为php-fpm编辑`www.conf`?

By using Berkshelf I'm installing php-fpm.

And I want to comment out following lines in /etc/php-fpm.d/www.conf:

;listen.owner = www-data
;listen.group = www-data

But I couldn't find where should I edit in cookbooks/php-fpm directory. And I don't know if it is ok to edit files directly that is created by Berkshelf automatically.

Where and how can I reflect that change?

Edit

The problem is there is no www.conf in php-fpm template. I think this file is somehow generated dynamically. Does anyone know how the file www.conf generated?

This is the result of find.

find . -name '*.conf.*'
./templates/default/pool.conf.erb
./templates/default/php-fpm.conf.erb
  • 写回答

2条回答 默认 最新

  • doushen4719 2014-09-06 11:43
    关注

    I added this line to *.json node config file, then the values are override.

    php-fpm": { "listen_owner": "nginx", "listen_group": "nginx" }, 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
  • drw85135 2014-08-20 13:20
    关注

    Hum, seems what you're looking for is overiding the template in php-fpm cookbook.

    The best method would be to create a wrapper cookbook which will do that.

    you can have a look here for that: Replacing a template in a wrapper cookbook

    for the php-fpm the configuration is done inside a definition (HWRP), have a look inside it to find the template call and see how to ovewrite it.

    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 android百度地图SDK海量点显示标题
  • ¥15 windows导入environment.yml运行conda env create -f environment_win.yml命令报错
  • ¥15 这段代码可以正常运行,打包后无法执行,在执行for内容之前一直不断弹窗,请修改调整
  • ¥15 C语言判断有向图是否存在环路
  • ¥15 请问4.11到4.18以及4.27和4.29公式的具体推导过程是怎样的呢
  • ¥20 将resnet50中的卷积替换微ODConv动态卷积
  • ¥15 通过文本框输入商品信息点击按钮将商品信息列举出来点击加入购物车商品信息添加到表单中
  • ¥100 这是什么压缩算法?如何解压?
  • ¥20 upload上传实验报错500,如何解决?(操作系统-windows)
  • ¥15 谁知道 ShaderGraph 那个节点可以接入 Particle System -> Custom Data