title: Error executing action `run` on resource 'execute[enable mod_proxy for apache-tomcat binding]'
body: <p>I am using <a href="https://github.com/gitsubham/testrepo.git" rel="nofollow">this github repo</a> to understand the working of Berkshelf when used along with Amazon Opsworks. The basic idea behind what i am trying is if i mention apache2 as a dependency in berksfile for my <em>phpapp recipe</em> then it will automatically manage the dependencies for <em>apache2</em> which itself is a dependency for phpapp. when i try this with AWS opsworks i get the following error.</p>
  
  <pre><code>   ================================================================================
     Error executing action `run` on resource 'execute[enable mod_proxy for apache-tomcat binding]'
     ================================================================================
  
  
  Mixlib::ShellOut::ShellCommandFailed
  ------------------------------------
  Expected process to exit with [0], but received '1'
  ---- Begin output of /usr/sbin/a2enmod proxy ----
  STDOUT: 
  STDERR: ERROR: Module proxy does not exist!
  ---- End output of /usr/sbin/a2enmod proxy ----
  Ran /usr/sbin/a2enmod proxy returned 1
  
  
  Resource Declaration:
  ---------------------
  # In /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_java/recipes/apache_tomcat_bind.rb
  
  1: execute 'enable mod_proxy for apache-tomcat binding' do
  2:   command '/usr/sbin/a2enmod proxy'
  3:   not_if do
  4:     ::File.symlink?(::File.join(node['apache']['dir'], 'mods-enabled', 'proxy.load')) || node['opsworks_java']['tomcat']['apache_tomcat_bind_mod'] !~ /\Aproxy/
  5:   end
  6: end
  7: 
  
  
  
  Compiled Resource:
  ------------------
  # Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_java/recipes/apache_tomcat_bind.rb:1:in `from_file'
  
  execute("enable mod_proxy for apache-tomcat binding") do
  action "run"
  retries 0
  retry_delay 2
  command "/usr/sbin/a2enmod proxy"
  backup 5
  returns 0
  cookbook_name "opsworks_java"
  recipe_name "apache_tomcat_bind"
  not_if { #code block }
  end
  </code></pre>