Wed Nov 24 00:34:05 2010] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
搭建虚拟主机时候报错如上面所示:
解决:大概意思就是后面新增加的这个个VirtualHost 由于端口被占用,不能生效,沿用第一个虚拟主机的配置。
NameVirtualHost *:80 ######### 原来没有这行,添加后即可解决上述问题
#########################################################
<VirtualHost *:80>
ServerAdmin webmaster@xxx.com
DocumentRoot /data/www/xxxxx
<Directory "/data/www/xxxxxx">
AllowOverride All
#Options MultiViews Includes
OPtions All
Order allow,deny
Allow from all
</Directory>
ServerName www.xxx.com
# ServerAlias www.cccdu.com
ErrorDocument 404 /index.php
CustomLog "|/usr/local/sbin/cronolog /data/apache/logs/access_log69.%Y-%m-%d.log" combined
</VirtualHost>
##########################################################
<VirtualHost *:80>
ServerAdmin webmaster@xxxxcom
DocumentRoot /data/www/xxxxxx
<Directory "/data/www/xxxxxx">
AllowOverride All
OPtions All
Order allow,deny
Allow from all
</Directory>
ServerName www.xxxx.com
</VirtualHost>
转载于:https://blog.51cto.com/auskangaroo/433429