如何在 AWS 应用程序负载均衡器 (ALB) 端口转发中转发端口 [英] How to forward port in AWS Application load balancer (ALB) port forwarding

查看:79
本文介绍了如何在 AWS 应用程序负载均衡器 (ALB) 端口转发中转发端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 EC2 实例上运行应用程序并让负载均衡器侦听端口 80,但将其代理到实例端口 8080?

Is it possible to have an application running on an EC2 instance and have a load balancer listen on port 80 but proxy it to the instances port 8080?

我似乎无法让它发挥作用.我需要更改什么设置.我在应用程序负载平衡器后面运行集群.

I cannot seem to get this to work. What setting to I need to change. I am running the cluster behind an application load balancer.

推荐答案

使用 AWS 管理片段添加答案.

Adding answer with AWS management snippets .

在目标组中添加实例端口,参考下图.例如我已经将 tomcat 8080 端口添加到目标组端口/

Add the instance port in the target group, refer below image for it. for example i've added tomcat 8080 port to the target group port/

确保您的 ELB 面向互联网.请参阅下面的 ELB 摘要图片,它说我的 ELB 是面向互联网的.并检查您的路由是否已正确添加.

Make sure that your ELB is internet facing. refer below image of ELB summary , which says that my ELB is internet -facing. and check that your routing is properly added.

这篇关于如何在 AWS 应用程序负载均衡器 (ALB) 端口转发中转发端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆