假设我有两个文档根domain2 1和domain2 2/
我知道如何从我自己的计算机访问这两个根,如果它们驻留在同一台计算机上。我的问题是,如果我想在我的ec2服务器上做同样的事情,我应该如何将我的弹性ips配置成这两个根呢?我知道,在默认情况下,弹性ip只与名称localhost(127.0.0.1)关联到根。
有人能给我一个详细的答案吗?举个例子会有帮助的,谢谢!
发布于 2012-06-20 11:46:40
只需在EC2实例上创建2个虚拟主机,如下所示:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /www/domain1
ServerName domain1
ServerAlias www.domain1
# Other directives here
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /www/domain2
ServerName domain2
ServerAlias www.domain2
# Other directives here
</VirtualHost>https://serverfault.com/questions/399376
复制相似问题