How do I enable/disable a website hosted with Apache?
To enable or disable a site hosted with Apache, you can use the 'a2ensite' and 'a2dissite' commands, respectively. Both commands use essentially the same syntax:
where '<site>' is the name of your site's Virtual Host configuration file, located in '/etc/apache2/sites-available/', minus the '.conf' extension. For example, if your site's Virtual Host configuration file is called 'example.com.conf', then the commands would look like</site>
There are other, more complicated ways to do this, but these commands basically just automate those processes anyway, so my advice is to use these commands to ensure that everything is always configured correctly. Also, remember to restart Apache after running those commands. The exact command will depend on which Linux distribution you are using, but will most likely be one of the following 2 commands:
sudo systemctl restart apache2
sudo service apache2 restart
Linode Support Team