How to change chef nginx default http port 80? How to change chef nginx default http port 80? nginx nginx

How to change chef nginx default http port 80?


Here is how to change the port. Edit /etc/opscode/chef-server.rb

nginx['non_ssl_port'] = 10080nginx['ssl_port'] = 10443nginx['url'] = "https://<YOUR URL>:10443/"

and adjust your local ~/.chef/knife.rb to read

chef_server_url 'https://<YOUR URL>:10443/organizations/<YOUR ORG>'

But currently there is a bug in Chef that prevents the embedded nginx to run on a non standard port: https://github.com/chef/chef-server/issues/50


The settings should be added into /etc/opscode/chef-server.rb for Chef12.

After chef-server-ctl reconfigure, nginx's HTTP port is changed to 9898.