/etc/apache2/conf.d/virtul.conf:
NameVirtualHost *
在sites-enabled/website1.org的第一个文件中,您将看到一个组,如:
<VirtualHost *>
ServerName website1.org
</VirtualHost>website2.org也是如此。
位于website1.org中的域(和子域)应该如何工作。但是,website2.org不起作用。在浏览器中访问website2.org时,我得到一个500 Internal Server Error
两个注意事项: 1)当运行# /etc/init.d/apache2 restart时,我得到:
* Restarting web server apache2 [Tue Jul 24 09:31:59 2012] [warn] NameVirtualHost 72.10.54.89:80 has no VirtualHosts
... waiting [Tue Jul 24 09:32:00 2012] [warn] NameVirtualHost 1.23.456.769:80 has no VirtualHosts2) website2.org有一个ssl证书,并将ssl设置为sites-enabled/website2.org-ssl
是的,我为每个域运行了a2ensite,然后运行了一个Apachereload,并且在安装之后,我做了一个Apacherestart。
我怎样才能让我的第二个网站现场直播?我不知道下一步该查什么..。寻求帮助。
编辑@RedFoxy **
* Restarting web server apache2 [Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:57 2012] [warn] NameVirtualHost 72.10.54.89:80 has no VirtualHosts
[Tue Jul 24 10:56:57 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting [Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Tue Jul 24 10:56:58 2012] [warn] NameVirtualHost 72.10.54.89:80 has no VirtualHosts
[Tue Jul 24 10:56:58 2012] [warn] NameVirtualHost *:80 has no VirtualHosts发布于 2012-07-24 17:19:06
这很简单,只是您必须将端口指定为:
NameVirtualHost *:80和
<VirtualHost *:80>
ServerName website1.org
</VirtualHost>记住要更改:80使用您需要的web端口。
https://serverfault.com/questions/410733
复制相似问题