我需要访问一个我将在没有域的情况下安装的 wordpress,因为我创建了另一个 ip 地址以使所有基于名称的主机都在同一个 ip 上,但是当我重新启动 httpd 服务时它返回几个警告并且所有域指向到第一个。
Starting httpd: [Thu Aug 15 19:22:58 2013]
[warn] VirtualHost 176.111.104.95:80 overlaps with VirtualHost 176.111.104.95:80,
the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Aug 15 19:22:58 2013]
[warn] VirtualHost 176.111.104.95:80 overlaps with VirtualHost 176.111.104.95:80,
the first has precedence, perhaps you need a NameVirtualHost directive
<VirtualHost 176.111.104.95:80>
ServerAdmin admin@carviz.pt
DocumentRoot /var/www/html/carviz.pt/public_html
ServerName carviz.pt
ServerAlias www.carviz.pt
ErrorLog logs/carviz.pt-error_log
CustomLog logs/carviz.pt-access_log common
</VirtualHost>
<VirtualHost 176.111.104.95:80>
ServerAdmin admin@instaclasse.com
DocumentRoot /var/www/html/instaclasse.com/public_html
ServerName instaclasse.com
ServerAlias www.instaclasse.com
ErrorLog logs/instaclasse.com-error_log
CustomLog logs/instaclasse.com-access_log common
</VirtualHost>
<VirtualHost 176.111.104.95:80>
ServerAdmin ftpaul@gmail.com
DocumentRoot /var/www/html/skala.pt/public_html
ServerName skala.pt
ServerAlias www.skala.pt
ErrorLog logs/skala-error_log
CustomLog logs/skala-access_log common
</VirtualHost>
我在关注这个例子: http://httpd.apache.org/docs/current/vhosts/examples.html上的基于名称和基于 IP 的混合虚拟主机