Error in the template in the Apache cookbook when working on the Ubuntu server

I use the cook in my Digital Ocean account to create a drop / copy. My Ubuntu 12.04 x64 server. In my cheffile I have

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

cookbook 'apache2',
    :git =>'https://github.com/opscode-cookbooks/apache2'
....

And in my node 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]"

]

I had to limit the modules already due to some error with authz. But now I always get an error

 * 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.

What is wrong with my configuration to have erros in:

  • Traditional Apache setup (with all modules?)
  • Template error for LockFile?
+3
source share
3 answers

It looks like this might be a known issue with the chef and the Apache2 recipe.

See related issue tracker tickets for a question.

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

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

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

, , apache 2.2,

default['apache']['package']
+5

, , .

, apache2/templates/apache2.conf.erb.

LockFile /var/lock/apache2/accept.lock

:

Mutex file:${APACHE_LOCK_DIR} default
+3

, ubuntu/trusty64 apache2, chef-solo. Ubuntu 14 Apache 2.4, .

:

Sorry, I would suggest that this basic configuration should work out of the box. As mentioned above, migration from apache2.2 to apache2.4 is planned here: https://tickets.opscode.com/browse/COOK-3900

+2
source

All Articles