title: How to change chef nginx default http port 80?
body: <p>I tried to install apache on a machine that chef-server was installed. Apache could not start up due to the occupation of port 80 by chef nginx. If I want to let apache use port 80 as default, is it possible to change chef nginx default http port to another one?</p>
  
  <p>I found a solution on the Internet to set virtual host on both apache and nginx, but they need a <a href="https://serverfault.com/questions/679184/sharing-chef-server-with-apache">different FQDN</a> as server name. My machine uses an IP instead of FQDN, so I need to change the default HTTP port for chef nginx.</p>
  
  <p>I tried to add <code>/etc/chef-server/chef-server.rb</code> with the following content:</p>
  
  <pre><code>nginx['non_ssl_port'] = 9898
  </code></pre>
  
  <p>Then I ran 'chef-server-ctl reconfigure'. It didn't work. </p>
  
  <p>Can anyone help on this? Thanks.</p>
  
  <p><strong>Updated</strong></p>
  
  <p>My information was wrong regarding changing the chef server settings. </p>
  
  <p>The settings should be added into <code>/etc/opscode/chef-server.rb</code> for Chef12. After <code>chef-server-ctl reconfigure</code>, nginx's HTTP port is changed to 9898.
  Thanks.</p>