Chef_server_url is incorrect

Hi All,

I’ve just built a new chef server, our existing infrastructure requires the use of DHCP networking (we reserve the IP to keep it static).

I’ve found the chef_server_url is incorrect, its used https://chef/ instead of where we have a real SSL cert installed in nginx.

[root@chef ~]# hostname

(replaced ourdomain with our real domain).

When I download the generate knife.rb config it comes back with:

current_dir = File.dirname(__FILE__)
log_level                :info
log_location             STDOUT
node_name                "myusername"
client_key               "#{current_dir}/myusername.pem"
chef_server_url          "https://chef/organizations/short_name"
cookbook_path            ["#{current_dir}/../cookbooks"]

Can I overwrite this value somewhere in the config?

Did You try chef-server-ctl reconfigure after changing the chef server URL?

Do you mean chef-server-ctl reconfigure ? If so yes several times without a fix.

Yes. I faced the same issue when i installed the first time. So i changed the host name to correct URL and Ran chef-server-ctl reconfigure fixed the issue