gpt4 book ai didi

apache - 同一个 ip 上不同的基于名称的主机

转载 作者:行者123 更新时间:2023-12-04 19:32:20 26 4
gpt4 key购买 nike

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

最佳答案

你可以看看ports.conf/etc/apache2
你可以在那里添加一些行:

NameVirtualhost 176.111.104.95:80
Listen 176.111.104.95:80

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

你可以改变你当前的虚拟主机
<VirtualHost 176.111.104.95:80>

关于apache - 同一个 ip 上不同的基于名称的主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18259222/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com