# OSS chef-server

**URL:** <https://discourse.chef.io/t/oss-chef-server/4767>\
**Category:** Chef Infra (archive)\
**Created:** [November 6, 2013, 3:45am UTC](https://discourse.chef.io/t/oss-chef-server/4767 "2013-11-06T03:45:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BK\_Box](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bk_box/32/402_2.png) [@BK\_Box](https://discourse.chef.io/u/BK_Box)\
**Post date:** [November 6, 2013, 3:45am UTC](https://discourse.chef.io/t/oss-chef-server/4767/1 "2013-11-06T03:45:04Z")

</div>

Ohai,

So I have been trying to spin up a new chef-server to test things out, but  
it is only temporary, so I have no need for an actual DNS entry to be  
setup. Although, no matter what configuration item I change it never  
downloads the cookbook from the IP address:

Error connecting to [https://chef.example.com/bookshelf/organization](https://chef.example.com/bookshelf/organization)

I have tried the following changes in the chef-server.rb and confirmed the  
settings are actually changed after a reconfigure:

api\_fqdn “1.2.3.4”

#nginx[‘server\_name’] = "[chef.example.com](http://chef.example.com)"  
nginx[‘server\_name’] = "1.2.3.4"  
nginx[‘url’] = "[https://1.2.3.4](https://1.2.3.4)"  
chef\_server\_webui[‘web\_ui\_admin\_user\_name’] = “admin”

bookshelf[“vip”] = node[“ipaddress”]  
bookshelf[“url”] = “https://#{node[‘ipaddress’]}”

I even recursively grepped all of /var/opt/chef-server to find the domain  
and change it from domain to IP and restarted.

Nothing.

Has anyone used OSS chef-server with just the IP of the server?

## Thanks.

BK Box

---

<div class="post-metadata">

**Author:** ![Joseph\_Smith2](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joseph_smith2/32/421_2.png) [@Joseph\_Smith2](https://discourse.chef.io/u/Joseph_Smith2)\
**Post date:** [November 6, 2013, 5:04am UTC](https://discourse.chef.io/t/oss-chef-server/4767/2 "2013-11-06T05:04:22Z")

</div>

Hi BK,

What's the output of hostname -f?

Have you followed the instructions for setting up a test environment  
without adding it to DNS as specified here:  
[http://docs.opscode.com/install\_server.html](http://docs.opscode.com/install_server.html) ?

js

On Tue, Nov 5, 2013 at 7:45 PM, BK Box [bk@theboxes.org](mailto:bk@theboxes.org) wrote:

> Ohai,
> 
> So I have been trying to spin up a new chef-server to test things out, but  
> it is only temporary, so I have no need for an actual DNS entry to be  
> setup. Although, no matter what configuration item I change it never  
> downloads the cookbook from the IP address:
> 
> Error connecting to [https://chef.example.com/bookshelf/organization](https://chef.example.com/bookshelf/organization)
> 
> I have tried the following changes in the chef-server.rb and confirmed the  
> settings are actually changed after a reconfigure:
> 
> api\_fqdn "1.2.3.4"
> 
> #nginx['server\_name'] = "[chef.example.com](http://chef.example.com)"  
> nginx['server\_name'] = "1.2.3.4"  
> nginx['url'] = "[https://1.2.3.4](https://1.2.3.4)"  
> chef\_server\_webui['web\_ui\_admin\_user\_name'] = "admin"
> 
> bookshelf["vip"] = node["ipaddress"]  
> bookshelf["url"] = "https://#{node['ipaddress']}"
> 
> I even recursively grepped all of /var/opt/chef-server to find the domain  
> and change it from domain to IP and restarted.
> 
> Nothing.
> 
> Has anyone used OSS chef-server with just the IP of the server?
> 
> ## Thanks.
> 
> BK Box

---

<div class="post-metadata">

**Author:** ![BK\_Box](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bk_box/32/402_2.png) [@BK\_Box](https://discourse.chef.io/u/BK_Box)\
**Post date:** [November 6, 2013, 3:01pm UTC](https://discourse.chef.io/t/oss-chef-server/4767/3 "2013-11-06T15:01:12Z")

</div>

Hi Joseph,

Yes I followed those instructions, but the problem I'm having is from the  
node being bootstrapped. The node installs chef, registers with the  
chef-server, and starts the run\_list. When it gets to the point to sync the  
cookbooks, the server responds with the location of the cookbooks at the  
domain instead of the IP address. Since the domain is not valid, the  
bootstrapped node cannot resolve it and fails. I could set an /etc/hosts on  
the new node, but that doesn't fix my problem of build and bootstrap with  
one command.

On Tue, Nov 5, 2013 at 9:04 PM, Joseph Smith [joseph@opscode.com](mailto:joseph@opscode.com) wrote:

> Hi BK,
> 
> What's the output of hostname -f?
> 
> Have you followed the instructions for setting up a test environment  
> without adding it to DNS as specified here:  
> [Install the Chef Infra Server](http://docs.opscode.com/install_server.html) ?
> 
> js
> 
> On Tue, Nov 5, 2013 at 7:45 PM, BK Box [bk@theboxes.org](mailto:bk@theboxes.org) wrote:
> 
> > Ohai,
> > 
> > So I have been trying to spin up a new chef-server to test things out,  
> > but it is only temporary, so I have no need for an actual DNS entry to be  
> > setup. Although, no matter what configuration item I change it never  
> > downloads the cookbook from the IP address:
> > 
> > Error connecting to [https://chef.example.com/bookshelf/organization](https://chef.example.com/bookshelf/organization)
> > 
> > I have tried the following changes in the chef-server.rb and confirmed  
> > the settings are actually changed after a reconfigure:
> > 
> > api\_fqdn "1.2.3.4"
> > 
> > #nginx['server\_name'] = "[chef.example.com](http://chef.example.com)"  
> > nginx['server\_name'] = "1.2.3.4"  
> > nginx['url'] = "[https://1.2.3.4](https://1.2.3.4)"  
> > chef\_server\_webui['web\_ui\_admin\_user\_name'] = "admin"
> > 
> > bookshelf["vip"] = node["ipaddress"]  
> > bookshelf["url"] = "https://#{node['ipaddress']}"
> > 
> > I even recursively grepped all of /var/opt/chef-server to find the domain  
> > and change it from domain to IP and restarted.
> > 
> > Nothing.
> > 
> > Has anyone used OSS chef-server with just the IP of the server?
> > 
> > ## Thanks.
> > 
> > BK Box

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [November 6, 2013, 3:35pm UTC](https://discourse.chef.io/t/oss-chef-server/4767/4 "2013-11-06T15:35:31Z")

</div>

On Tuesday, November 5, 2013 at 7:45 PM, BK Box wrote:

> Ohai,
> 
> So I have been trying to spin up a new chef-server to test things out, but it is only temporary, so I have no need for an actual DNS entry to be setup. Although, no matter what configuration item I change it never downloads the cookbook from the IP address:
> 
> Error connecting to [https://chef.example.com/bookshelf/organization](https://chef.example.com/bookshelf/organization)
> 
> I have tried the following changes in the chef-server.rb and confirmed the settings are actually changed after a reconfigure:
> 
> api\_fqdn "1.2.3.4"
> 
> #nginx['server\_name'] = "[chef.example.com](http://chef.example.com) ([http://chef.example.com](http://chef.example.com))"  
> nginx['server\_name'] = "1.2.3.4"  
> nginx['url'] = "[https://1.2.3.4](https://1.2.3.4)"  
> chef\_server\_webui['web\_ui\_admin\_user\_name'] = "admin"
> 
> bookshelf["vip"] = node["ipaddress"]  
> bookshelf["url"] = "https://#{node['ipaddress']}"
> 
> I even recursively grepped all of /var/opt/chef-server to find the domain and change it from domain to IP and restarted.
> 
> Nothing.
> 
> Has anyone used OSS chef-server with just the IP of the server?
> 
> ## Thanks.
> 
> BK Box

In the next point release of the chef-server, (11.0.10), it will defer to the provided Host header when generating URLs for responses, so that should fix your issue: [https://tickets.opscode.com/browse/CHEF-4086](https://tickets.opscode.com/browse/CHEF-4086)

However, at some future time, we’re going to make chef-client verify SSL certificates by default (right now you have to opt-in). When that happens, you’ll have to have the correct CN (i.e. hostname) in your SSL certificate or disable cert verification on the client. See here for more about that: [SSL Certificate Validation in Chef - Chef Blog | Chef](http://www.opscode.com/blog/2013/10/31/ssl-certificate-validation-in-chef/)

--  
Daniel DeLeo
