VM实例组配置为侦听端口80和8080

编程入门 行业动态 更新时间:2024-10-26 10:28:04
本文介绍了VM实例组配置为侦听端口80和8080的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经配置了我的虚拟机,以便在一台虚拟机上运行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

本文发布于:2023-08-07 13:59:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1319441.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:端口   实例   VM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!