Wednesday, May 21, 2014

Apache a2ensite with "Error! Site Does Not Exists"


I am now using "Apache/2.4.9 (Ubuntu)". After editing apache configuration file for my virtual hosted site (, I found an error while trying to enable my site:
>> sudo a2ensite

however, it returns:
"Error: does not exists"


So, I start to trace the problem. a2ensite is simply a perl script, we can open it with a text editor, and I saw:

This means that only filenames with ".conf" at the end is allowed. Therefore, I have to rename my setting file for
mv /etc/apache2/sites-available/ /etc/apache2/sites-available/
This time, it works!


I don't understand why the developer of this code brought out this design. Lots of people are used to name the configuration with their site domain name with ".conf". And, the developer should display more error message if ".conf" is required instead of only showing "does not exists" message.