1

我需要访问一个我将在没有域的情况下安装的 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 的混合虚拟主机

4

1 回答 1

0

ports.conf你可以看看/etc/apache2

你可以在那里添加一些行:

NameVirtualhost 176.111.104.95:80
Listen 176.111.104.95:80

或者更好(如果你只使用一个 ip)

你可以改变你当前的虚拟主机

<VirtualHost 176.111.104.95:80>

于 2014-03-19T05:14:01.520 回答