Where can I find the Nginx configuration and how do I restart the service?

The configuration for the Nginx web server can be found in two files.

/usr/local/etc/nginx/nginx.conf
/usr/local/etc/nginx/vhosts/default.conf

The default.conf is included in the nginx.conf. Additional files can also be added here.

Direct changes to the vHost, however, are made in the default.conf.

After every change to the Nginx configuration, at least one reload must be performed. If this is not sufficient, a restart must be performed.

The most common control commands for the Nginx service are listed below:

sudo service nginx start|stop|restart|reload|configtest|status