ERROR: Site example.com does not exists!
This error I have faced when created a new virtual host in Apache on my Ubuntu system. I create a virtual host configuration file in /etc/apache2/sites-available/ directory with name example.com. Now I tried to enable website using a2ensite command and faced following issue.
a2ensite example.comERROR: Site example.com does not exists!
The problem was that all virtual host configuration files must have .conf extension in their file name. So I simply renamed example.com with example.com.conf.
# cd /etc/apache2/sites-available/ # mv example.com example.com.conf
and again tried to enable website using same command and this time I found its working properly.
[email protected]:~# a2ensite example.com