华域联盟 Linux Apache NameVirtualHost *:80 has no VirtualHosts问题解决办法

Apache NameVirtualHost *:80 has no VirtualHosts问题解决办法

当启动apache的时候,如果事件管理器出现“Apache NameVirtualHost *:80 has no VirtualHosts”错误时,大部分是因为修改了apache的httpd.conf配置文件,将extra/vhosts.conf文件引入到httpd.conf中了。

复制代码 代码如下: # Virtual hosts

Include conf/extra/httpd-vhosts.conf

httpd-vhosts.conf文件中有一句配置语句为

复制代码 代码如下:

NameVirtualHost *:80

如果httpd-vhosts.conf中没有存在类似:


复制代码 代码如下:

<VirtualHost *:80>

    ServerAdmin [email protected]

    DocumentRoot "D:/WAPM/www"

    ServerName www.cnhackhy.com

    ServerAlias www.cnhackhy.com

    ErrorLog "logs/www.cnhackhy.com-error.log"

    CustomLog "logs/www.cnhackhy.com-access.log" common

</VirtualHost>

配置节,就会在事件管理器中出现Apache NameVirtualHost *:80 has no VirtualHosts错误。加上同上面的配置节就不会出现这个错误了。

您可能感兴趣的文章:

本文由 华域联盟 原创撰写:华域联盟 » Apache NameVirtualHost *:80 has no VirtualHosts问题解决办法

转载请保留出处和原文链接:https://www.cnhackhy.com/47688.htm

本文来自网络,不代表华域联盟立场,转载请注明出处。

作者: sterben

发表回复

联系我们

联系我们

2551209778

在线咨询: QQ交谈

邮箱: [email protected]

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部