我在 Apache 中有多个 VirtualHost,它们都在端口 80 上侦听,它们的 ServerNames 设置为不同的网址。当我直接访问该 IP 地址时,Apache 默认将我发送到其中一个网站。我想更改哪个虚拟主机处理对 IP 地址的请求。我该怎么做?
<!-- This is currently the default (probably because it's first alphabetically) -->
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName mywebsite.com
DocumentRoot /var/www/testingother
...
</VirtualHost>
<!-- I want this to be default -->
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName myotherwebsite.com
DocumentRoot /var/www/testing
...
</VirtualHost>