简体   繁体   English

亚马逊EC2中的网址映射

[英]url mapping in amazon ec2

I am working on a site with amazon EC2 instanc e, We have created two instance lets EC1 and EC2 . 我正在使用Amazon EC2 instanc的网站上工作,我们创建了两个实例让EC1EC2 on EC1 we have our website which we have mapped with www.example.com . EC1我们拥有我们的网站,该网站已映射到www.example.com and another instance EC 2 has our main application. EC 2是我们的主要应用。 now what we want is that if anyone type www.example.com then it should be redirected to EC1 instance and let if he types www.example.com/anyThingHeTypes then he should be redirected to EC2 instance . 现在我们想要的是,如果有人键入www.example.com ,则应将其重定向到EC1 instance ,如果他键入www.example.com/anyThingHeTypes ,则应将其重定向到EC2 instance Is it possible with Amazon instances ? Amazon instances是否可能? if Yes then please help us guys 如果是的话,请帮助我们

This is much easier to do with subdomains. 使用子域更容易做到这一点。 Since DNS can send traffic directly to the second instance. 由于DNS可以将流量直接发送到第二个实例。 If you want to do it with a folder, than you need to configure your webserver to be a reverse proxy to instance 2. 如果要使用文件夹,则需要将Web服务器配置为实例2的反向代理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM