最近在Apache上架设Virtual-hosts 时,发现启动了httpd-vhost.conf  之后,再用IP 访问Main Server(httpd.conf)的设置就失效了。比如说原来 在 htdocs/下有一些应用程序,就不能够再访问到。用IP所有的请求就被转发到了,第一个虚拟主机上。
官方的解释:


The asterisks match all addresses, so the main server serves no requests. Due to the fact that www.example1.com is first in the configuration file, it has the highest priority and can be seen as the default or primary server. That means that if a request is received that does not match one of the specified ServerName directives, it will be served by this first VirtualHost.