Site does not exist error for a2ensite

Viewed 335191

I have cmsplus.dev under /etc/apache2/sites-available with the following code,

<VirtualHost *:80>
    ServerAdmin master@server.com
    ServerName www.cmsplus.dev
    ServerAlias cmsplus.dev

    DocumentRoot /var/www/cmsplus.dev/public

    LogLevel warn
    ErrorLog /var/www/cmsplus.dev/log/error.log
    CustomLog /var/www/cmsplus.dev/log/access.log combined
</VirtualHost>

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

ERROR: Site cmsplus.dev does not exist!

My webserver Apache/2.4.6 (Ubuntu)

How to solve this issue?

10 Answers

I realise that's not the case here but it might help someone.

Double-check you didn't create the conf file in /etc/apache2/sites-enabled by mistake. You get the same error.

Related