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

2025-05-27 0 72

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


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

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

快网idc优惠网 行业资讯 Apache NameVirtualHost *:80 has no VirtualHosts问题解决办法 https://www.kuaiidc.com/63411.html

相关文章

发表评论
暂无评论