devo devo - 1 year ago 222
Apache Configuration Question

Site does not exist error for a2ensite

I have
with the following code,

<VirtualHost *:80>

DocumentRoot /var/www/

LogLevel warn
ErrorLog /var/www/
CustomLog /var/www/ combined

Now when I use
sudo /usr/sbin/a2ensite
, I am getting the error,

ERROR: Site does not exist!

My webserver
Apache/2.4.6 (Ubuntu)

How to solve this issue?

Answer Source

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

but it returns:

Error: 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 to as might be achieved as follows:

mv /etc/apache2/sites-available/ /etc/apache2/sites-available/


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download