apache配置多个域名指向的虚拟主机访问总是指向第一个虚拟主机
在配置apache多个虚拟主机的时候,访问总是指向第一个虚拟主机,
加上 NameVirtualHost * 后解决问题.
NameVirtualHost *
<VirtualHost *>
DocumentRoot "F:/web/"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "F:/web/aa/"
ServerName *.test.com
</VirtualHost>
加上 NameVirtualHost * 后解决问题.
NameVirtualHost *
<VirtualHost *>
DocumentRoot "F:/web/"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "F:/web/aa/"
ServerName *.test.com
</VirtualHost>
none