Enable site

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/example.com
 sudo nano /etc/apache2/sites-available/example.com
 sudo a2ensite example.com
 sudo /etc/init.d/apache2 reload

Disable site

# disable site
sudo a2dissite SITE_NAME

# enable an apache2 module
sudo a2enmod

Restarting apache

#check apache config file
apache2ctl -t

#restart
sudo /etc/init.d/apache2 restart