fix [warn] _default_ VirtualHost overlap on port, the first have precedence issues In the Apache2 httpd.conf added 1 new virtualhost, domain name is www.ligh.com, at this time, the server a total of 2 virtualhost, apachectl Restart when the following warning prompts: [warn] _default_ VirtualHost overlap on port, the first have precedence probably means that the back of the newly added VirtualHost because the port is occupied, not Can take effect, the configuration of the first virtual host is inherited. www.2cto.com check a bit, found that the original in httpd.conf, I did not #namevirtualhost *:80 before the comments removed, resulting in this did not take effect. Remove # After restart, problem resolution, if there is HTTPS, the overall modification is namevirtualhost *:80namevirtualhost *:433 linux system restart Apache appears: [[email protected] conf]# service httpd restartstopping httpd: [ ok ]starting httpd: [Wed Jul 06:52:43] [warn] _default_ VirtualHost overlap on port, the first has precedence[wed Jul 06:52:43] [warn] _default_ VirtualHost overlap on port, the first has precedence[wEd Jul 06:52:43] [warn] _default_ VirtualHost overlap on port, the first had precedence[wed Jul 16 06:52:43 200 8] [warn] namevirtualhost 124.254.31.4:80 has no virtualhosts see above hints, found that the Apache virtual host problem, warning: The default listener port 80 has overlapping, when we configure the virtual host normally, Linux system configuration, xxx.conf virtual configuration file, is generally the default access at the first station, indicating that the virtual host is not configured well. WORKAROUND: Edit the Virtual host configuration file and change it to two places. 1. One place namevirtualhost *:802. Two <virtualhost *:80> documentroot/home/wwwroot/ ServerName Xxx.com [[email protected] conf]# service httpd restartstopping httpd: &NBSP ; [ ok ]starting httpd: and nbsp [ ok ] http://www.2cto.com/os/201301/184034.html
[warn] _default_ VirtualHost overlap on port, the first has precedence