[chef] Re: Chef-server::apache-proxy....


Chronological Thread 
  • From: Andrea Campi < >
  • To:
  • Subject: [chef] Re: Chef-server::apache-proxy....
  • Date: Wed, 4 Jan 2012 17:28:10 +0100



On Wed, Jan 4, 2012 at 1:17 PM, RUSSELL Scott < "> > wrote:
From my initial investigations, it looks like I have a very poor understanding of just how vhosts are used in the apache2 recipe, and hence am struggling to know exaclty where to start looking for the problem.  It seems to me to be a problem where I am not specifying the "hostname" of the chef-server, but I think if I had an example tutuorial on how to take the apache2 recipe, deploy it, then deploy one then two vhosts, then I think my understanding would be so much better.    If anyone can help me, I would be happy to provide a tutuorial on how to do this, once I have done it(chicken/egg).

The backtrace points you to line 4, and specifically #each being called on nil:

 4:   ServerAlias <% @params['server_aliases'].each do |a| %><%= "#{a}" %> <% end %>

So it's server_aliases which is not defined correctly, not the server name.


Look at the apache-proxy recipe; with the latest version, it ends with:

web_app "chef-server-proxy" do
  template "chef_server.conf.erb"
  server_name "localhost"
  server_aliases [ node['hostname'], node['fqdn'], 'chef-server-proxy', "chef.#{node['domain']}" ]
  log_dir node['apache']['log_dir']
end

You probably have something different?

Andrea



Archive powered by MHonArc 2.6.16.

§