Chef Server on different port
You have to create or edit /etc/chef-server/chef-server.rb
and add the line below:
nginx['ssl_port'] = 449
Then run:
sudo chef-server-ctl reconfigure
sudo chef-server-ctl restart
Please see the docs.
Admin
Updated on July 04, 2022Comments
-
Admin almost 2 years
I installed a chef server 11 on a Server that is behind a firewall, ie I had to set up some natting for this server to be available and as a result the server is reachable on port 449 from the outside (instead of default 443 https port). Now I installed chef on my workstation, and set up knife. I set my chef_server_url as https://blahblah.com:449 (thats a bogus domain) . Now I can connect with knife to the server, since if I run something like 'knife client list', it does give the list. However, if I want to upload a cookbook, it does not do it, an it looks as if it tries to connect to the chef_server_url on the normal port 443:
h046n100:chef-repo chris$ knife cookbook upload hostname Uploading hostname [0.1.0] ERROR: Network Error: Error connecting to https://blahblah.com/sandboxes/00000000000020ec9bdebdbdaff8b9ed - Operation timed out - connect(2) Check your knife configuration and network settings
Any ideas anyone why it is doing this, and if/how it is possible to tell chef to use port 449?
Many thanks in advance!
-
Simon Levesque over 9 yearsAs an FYI for chef-server 12, the config file is now /etc/opscode/chef-server.rb . I searched for it during about 30 minutes, but found your answer in the firsts minutes. So I though I should leave that here :) Cheers
-
Ich almost 9 yearsIf you try this you should be aware of this bug: github.com/chef/chef-server/issues/50