To enable a virtual vhost website on your Ubuntu Server running Apache, you need to first create a vhost configuration file (just copy 000-defaul.conf as a quick way to start), and then run the a2ensite command to enable it so that Apache knows about it.

However, nowadays attempting to run a2ensite might just pop up with this particular error message:

ERROR: Site [YOURSITE] does not exist!

This is not a problem that used to occur, but in newer versions of Ubuntu it does – the reason for this is simple – your configuration file is probably missing a .conf extension, and the a2ensite perl script now only works with filenames ending in .conf!

So to fix, simply add the .conf your site vhost configuration file and run a2ensite again.

sudo a2ensite YOURSITE.conf

This time around you should be all good, and can jump straight into the next step of reloading Apache’s configuration with:

sudo service apache2 reload

Nifty.

Apache attack helicopter