Chef and Apache compatibility

When chef is installed on a server where Apache is already running on a port 80, proceed as follow to prevent the chef server to listen on the port 80.

Navigate in the chef webserver settings directory

cd /var/opt/opscode/nginx/etc

Edit the configuration file

vi nginx.conf

Comment the following lines

# server {
 # listen 80;
 # access_log /var/log/opscode/nginx/rewrite-port-80.log;
 # return 301 https://$host$request_uri;
 # }

Restart chef and check that no error is returned anymore

chef-server-ctl restart nginx
chef-server-ctl tail nginx