如何通过aws elb连接到特定端口

How to connect to particular port by aws elb

我有两个 ec2 实例并将 java 个应用程序部署到“/var/www/html”。 它们在端口 9010 中 运行,我可以通过“http://xxxx:9010”访问它们。

接下来,我创建了 elb 并将两个实例添加到 it.However,我无法通过 elb public dns 'http:elbxxxxx:9010' 访问 java 应用程序。它返回 404。

我把 index.html 放到 '/var/www/html/' ,我可以通过 elb public dns.

看到 index.html

我正在为 elb 控制台中的端口寻找一些配置,但我找不到。

我如何访问它们?

您必须配置 listener on the Elastic Load Balancer. Your listener can be configured to listen on any port (such as 80) and send the requests to your instances on port 9010. Here's how to configure 个侦听器。