How to enable Nginx site

Your website config file should be placed in /etc/nginx/sites-available and all you have to do is create a symbolic link in /etc/nginx/sites-enabled pointing to the website you want to enable.

like so from the command line interface in Ubuntu :

  1. ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
  2. sudo service nginx reload

Disabling :
If you want to disable a website, just delete the associated symbolic link :

  1. rm /etc/nginx/sites-enabled/example.com
  2. sudo service nginx reload