站点不存在错误a2ensite [英] Site does not exist error for a2ensite

查看:162
本文介绍了站点不存在错误a2ensite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

cmsplus.dev 的/ etc / apache2的/网站可用通过以下code

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>

现在,当我使用 sudo的/ usr / sbin目录/ a2ensite cmsplus.dev ,我收到错误,

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

ERROR: Site cmsplus.dev does not exist!

我的web服务器的Apache / 2.4.6(Ubuntu的)

如何解决这个问题?

推荐答案

通过增加解决问题的 .conf文件扩展站点配置文件。

Solved the issue by adding .conf extension to site configuration files.

阿帕奇 a2ensite 结果:

错误!站点不存在。

问题;如果您发现错误尝试启用使用站点:

Problem; If you found the error while trying to enable a site using:

sudo a2ensite mysite.com

但它返回:

错误:mysite.com不存在

Error: mysite.com does not exist

a2ensite 是一个简单的Perl脚本,只有文件名结尾的作品 .conf文件

a2ensite is simply a perl script that only works with filenames ending .conf

所以,我必须为 mysite.com 我的设置文件重命名为 mysite.com.conf 的威力来实现,如下所示:

Therefore, I have to rename my setting file for mysite.com to mysite.com.conf as might be achieved as follows:

mv /etc/apache2/sites-available/mysite.com /etc/apache2/sites-available/mysite.com.conf

成功

这篇关于站点不存在错误a2ensite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆