运行到Ubuntu服务器时,Apache cookbook中的模板出错

use*_*432 3 apache ubuntu apache2 chef-infra opscenter

我在我的数字海洋账户中使用Chef来构建一个Droplet/instance.我的服务器是Ubuntu 12.04 x64.在我的Cheffile我有

...
site 'http://community.opscode.com/api/v1'

cookbook 'apache2',
    :git =>'https://github.com/opscode-cookbooks/apache2'
....
Run Code Online (Sandbox Code Playgroud)

在我的节点json中:

...
"apache": {
"default_modules" : 
  ["status","alias","auth_basic","autoindex","dir","env","mime","negotiation","setenvif"]
  },
...
"run_list": [
"recipe[gearman]",
"recipe[postgresql::server]",
"recipe[php]",
"recipe[apache2]",
"recipe[apache2::mod_php5]",
"recipe[mysql]",
"recipe[mysql::server]"
Run Code Online (Sandbox Code Playgroud)

]

由于authz的一些错误,我不得不限制模块.但现在,我总是收到错误

 * The apache2 configtest failed.
STDERR: Output of config test was:
AH00526: Syntax error on line 11 of /etc/apache2/apache2.conf:
Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
Run Code Online (Sandbox Code Playgroud)

我的配置有什么错误在于:

  • Apache传统设置(包含所有模块?)
  • LockFile的模板错误?

Jer*_*ton 5

看起来这可能是厨师和Apache2配方的一个已知问题.

请参阅opscode问题跟踪器上的相关故障单.

https://tickets.opscode.com/browse/COOK-3837

https://tickets.opscode.com/browse/COOK-3838

https://tickets.opscode.com/browse/COOK-3900

现在你可以通过覆盖属性来尝试安装2.2版的apache

default['apache']['package']
Run Code Online (Sandbox Code Playgroud)