Site does not exist error for a2ensite

Solved the issue by adding .conf extension to site configuration files.

Apache a2ensite results in:

Error! Site Does Not Exist

Problem; If you found the error while trying to enable a site using:

sudo a2ensite example.com

but it returns:

Error: example.com does not exist

a2ensite is simply a Perl script that only works with filenames ending .conf

Therefore, I have to rename my setting file for example.com to example.com.conf as might be achieved as follows:

mv /etc/apache2/sites-available/example.com /etc/apache2/sites-available/example.com.conf

Success

Leave a Comment