[英]Resolving multiple domain names to different virtual machines on the same WAN IP
I am running a couple of VMs on my LAN (using proxmox) and I have a single External IP. 我正在LAN上运行几个VM(使用proxmox),并且只有一个外部IP。 I have 2 domains and I have them setup to resolve to my External IP.
我有2个域,并且设置了它们以解析为我的外部IP。
Question: I would like to do the following 问题:我想做以下事情
I haven't been able to find a solution to this specific scenario. 我还没有找到针对这种特定情况的解决方案。 Any pointers will be great.
任何指针都会很棒。
You'll need something that understands HTTP, ie something that operates at OSI Layer 7. The only way I know to do that is to have something like an HTTP load balancer in front of your VM's, then have your VM's on some sort of private (eg 192.168.1.0/24) IP space behind that load balancer (LB). 您需要能够理解HTTP的东西,即可以在OSI Layer 7上运行的东西。我知道的唯一方法是在VM的前面安装HTTP负载平衡器之类的东西,然后将VM放在某种私有的设备上。 (例如192.168.1.0/24)该负载平衡器(LB)后面的IP空间。 The LB will then interpret the HTTP URL and direct HTTP sessions to the appropriate VM.
然后,LB将解释HTTP URL,并将HTTP会话定向到适当的VM。
Personally, the way I do it is just run both URL's on a single Apache instance using VirtualHosts. 就个人而言,我的方法是使用VirtualHosts在单个Apache实例上运行两个URL。 It's actually pretty secure to do it that way, and it's the "time honored" way to run multiple Web sites on a single WAN IP address.
这样实际上是相当安全的,并且它是在单个WAN IP地址上运行多个网站的“按时完成”的方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.