If you have previously used Apache you should now about a2ensite tool. If you start using nginx you probably find out that there are no such tool for nginx.

You can use following command to do that:

ln -s /etc/nginx/sites-available/mysite /etc/nginx/sites-enabled/mysite
and then restart nginx

sudo service nginx restart
But… I have found one small script that can do that for you. Also, it can display list of all available or enabled sites, disable site and automatically restart nginx.

#apache #ubuntu #nginx #site #a2ensite

Tool for Enabling or Disabling Nginx Sites
1.25 GEEK