- From: Michael Leinartas <
>
- To:
- Subject: [chef] Re: Re: Chef-server::apache-proxy....
- Date: Wed, 4 Jan 2012 22:23:28 -0600
I ran into this too when first moving to the chef-server cookbook and
never got around to documenting it with a JIRA (sorry).
Changing the quoted hash keys for @params to symbols will fix the
problem for you. So from:
@params['server_aliases']
to:
@params[:server_aliases]).
Also, just found this:
http://tickets.opscode.com/browse/COOK-541
which outlines a few other problems with that particular template
though a new cookbook has yet to be cut with the changes
On Wed, Jan 4, 2012 at 10:28 AM, Andrea Campi
<
>
wrote:
>
>
>
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.