Site does not exist error for a2ensite

后端 未结 10 1780
心在旅途
心在旅途 2020-12-12 10:04

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


    ServerAdmin master@serv         


        
10条回答
  •  抹茶落季
    2020-12-12 10:16

    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

提交回复
热议问题