Apache NameVirtualHost *:80 has no VirtualHosts问题解决办法_技术学院_宜昌市隼壹珍商贸有限公司

您好,欢迎访问宜昌市隼壹珍商贸有限公司

400 890 5375
当前位置: 主页 > 新闻动态 > 技术学院

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

发布时间:2026-01-18  |  点击率:

当启动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 webmaster@
    DocumentRoot "D:/WAPM/www"
    ServerName www.
    ServerAlias www.
    ErrorLog "logs/www.-error.log"
    CustomLog "logs/www.-access.log" common
</VirtualHost>

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

全国统一服务电话

400 890 5375

电子邮箱:879577@qq.com

公司地址:宜昌市西陵区黄河路5号三峡明珠10栋1051室

咨询微信

TEL:13680874598