[chef] Re: Re: Re: chef-client issues: trying to connect to localhost


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Re: chef-client issues: trying to connect to localhost
  • Date: Sat, 8 Jan 2011 17:43:57 -0800

On Sat, Jan 8, 2011 at 5:22 PM, Kirk Richey 
< >
 wrote:
>
>> On Jan 8, 2011, at 8:03 PM, Daniel DeLeo wrote:
>>
>>> Most likely you haven't configured your proxy to set the correct
>>> HTTP_X_FORWARDED_HOST header.
>>>
>
> How would I do that?

Actually, the either the Host header or X-Forwarded-Host header will
work, though the X-Forwarded-Host header will be preferred if both are
set. We have the following in our `server {` block:

  proxy_set_header        Host            $host;
  proxy_set_header        X-Real-IP       $remote_addr;
  proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header        X-Forwarded-Proto http;

But that is for an internal LB, so you probably want to set
X-Forwarded-Proto to https. The Chef server needs these headers to
know what the absolute URLs of the requests it responds to are so that
it can correctly generate an absolute URL--otherwise it can't know the
hostname or protocol to use, as you've experienced.

HTH,
Dan DeLeo



Archive powered by MHonArc 2.6.16.

§