- From: RUSSELL Scott <
>
- To: "
" <
>
- Subject: [chef] RE: Re: Re: Chef-server::apache-proxy....
- Date: Thu, 5 Jan 2012 09:45:00 +0200
- Accept-language: en-GB
- Acceptlanguage: en-GB
Hi,
Michael, thanks so much for the response. You were right on the
money. I had looked through the code for the "server_aliases" but there
were so many that I did not do a thorough evaluation of each and every line.
I made the change you suggested and then found another issue with the "port",
and before changing it, I then referenced the opscode ticket you suggested(It
has several changes). I then downloaded the bootstrap file
(/home/echa-reach-adm/Documents/temp/cookbooks/chef-server_new/templates/default/chef_server.conf.erb)
that was referenced on the ticket and copied the
cookbooks/chef-server/templates/default/chef_server.conf.erb to my
chef-server cookbook, deleted it on the chef server and then redeployed it to
the chef server and now the API is secured via SSL. There were around 6 files
changed between the current chef-server and the one in the bootstrap, but I
only needed this one file. The functionality I need is working. Fantastic !
thanks to everyone who
replied. Great that you have helped me on such a minor issue, but pretty
major to me.
Sc0tt...
To:
Subject: [chef] Re: Re: Chef-server::apache-proxy....
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
>
>
>
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.