我已经配置了我的虚拟机,以便在一台虚拟机上运行2个应用程序。 第一个应用程序监听ip:80端口第二个应用程序监听ip:8080端口
我已经在VM实例组上启用了端口。
我的Load Balancer配置了两个像这样的前端规则。
我想将ip1:80映射到我的80端口应用程序和ip2:8080至8080应用程序
当我尝试使用负载均衡器IP地址访问我的应用程序时,它总是向我显示8080端口应用程序。
我有两个后台服务运行帮我在这里谷歌团队。如果您想使用IP地址而不是URL /域来访问您的Web应用程序,那么 URL地图无法帮助实现您的设计,因为URL地图使用主机值(example)将请求转发到正确的后端服务。 code>和路径值(/ path)。
可以在您的LB资源中再添加一个目标代理,以将传入的请求直接路由到所需的后端服务。这将允许您将最小数量的实例保留为一个虚拟机。有关更多信息,请访问这篇文章。
I have configure my VM in such a way that I have 2 application running on one VM. First App listen on ip:80 port Second App listen on ip:8080 port
I have enabled ports on VM instances group like this.
I have my Load Balancer configured with two front rules like this.
I want to map ip1:80 to my 80 port application and ip2:8080 to 8080 application
when I tried accessing my application using load balancers IP address it always show me 8080 port application.
I have two backend service running help me here google team. I m newb
解决方案If you want to use IP addresses but not URLs/Domain(s) to reach to your web applications, then URL Maps cannot help to implement your design, as URL map forwards the request to the correct backend service using host values (example) and path values (/path) in the destination URL.
That being said, you can add one more Target Proxy to your LB resources to route incoming requests directly to the desired backend services. This will allow you to keep your minimum number of instances as one VM.
For more information, visit this article.
更多推荐
VM实例组配置为侦听端口80和8080
发布评论