the first has precedence, perhaps you need a NameVirtualHost directive

报错信息1:

Starting httpd: [Fri May 19 11:49:42 2011] [warn] VirtualHost 127.0.0.1:80 overl
aps with VirtualHost 127.0.0.1:80, the first has precedence, perhaps you need a
NameVirtualHost directive

这个说明虚拟主机的NAME没开,NameVirtualHost 就是他没开,如下就可以了

#加上这里就好了~~,之后就可加任意多的virtual host了

NameVirtualHost 192.168.8.37:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#     ServerAdmin webmaster@dummy-host.example.com
#     DocumentRoot /www/docs/dummy-host.example.com
#     ServerName dummy-host.example.com
#     ErrorLog logs/dummy-host.example.com-error_log
#     CustomLog logs/dummy-host.example.com-access_log common
#/VirtualHost>


<VirtualHost *:80>
     ServerAdmin webmaster@dummy-host.example.com
     DocumentRoot /var/www/html
     ServerName dummy-host.example.com
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost 192.168.8.37:80>
     ServerAdmin webmaster@dummy-host.example.com
     DocumentRoot /var/www/html
     ServerName XXX.com
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值