我在尝试禁用 Nginx 中的 default_enabled_site
时遇到了一些麻烦。
# My Cookbook
/cookbooks/my-server-book
- /recipes/
- /attributes/
metadata.rb
# Opscode Nginx
/cookbooks/nginx
我已覆盖['nginx']['enable_default_site'] = false
到我的/cookbooks/my-server-book/attributes/default.rb
文件中,但看起来 Nginx Recipe 覆盖了我的更改
Recipe: nginx::commons_conf
* template[nginx.conf] action create (up to date)
* template[/etc/nginx/sites-available/default] action create (up to date)
* execute[nxdissite default] action run (skipped due to only_if)
任何见解我都会非常感激。
我在 node.json 文件中尝试了以下操作,但没有成功:
{
"nginx": {
"default_site_enabled": false
},
"run_list": ["recipe[main]"]
}
最佳答案
execute[nxdissite default]
- 这告诉您默认站点已被禁用(配置文件将始终被创建,但不会符号链接(symbolic link)到当前启用的配置目录),因此您的覆盖似乎有效.
关于nginx - 覆盖 Nginx Recipe default_enabled_site,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15923307/