[英]path based routing for ecs service not work
I have an alb pointing to my ecs service registered to target-group-one.我有一个指向我的注册到 target-group-one 的 ecs 服务的 alb。 The DNS of the load balancer works fine and able to print the message from my simple apache webserver.
负载均衡器的 DNS 工作正常,能够从我的简单 apache 网络服务器打印消息。 However when I configure path based routing like in the image attached and the add the path to the the DNS url......com/gci, I get the error message The requested URL was not found on this server.
但是,当我配置基于路径的路由(如附图中所示)并将路径添加到 DNS url......com/gci 时,我收到错误消息The requested URL is not found on this server.
What am I not missing or not doing right?我没有错过什么或做得不对?
If your actual httpd server does not respond to /gci
without ALB, then it will not work with ALB.如果您的实际 httpd 服务器在没有 ALB 的情况下不响应
/gci
,那么它将无法与 ALB 一起使用。 The path rule that you configured only forwards the query to your target group (TG).您配置的路径规则仅将查询转发到您的目标组 (TG)。
So if the rule matches www.example.com/gci
, ALB will just forward the query to the associated TG.因此,如果规则与
www.example.com/gci
匹配,ALB 只会将查询转发到关联的 TG。 This means that your ECS service still must correctly respond to /gci
path.这意味着您的 ECS 服务仍然必须正确响应
/gci
路径。
In other words, the forwarding rules of ALB do not re-write the paths.换句话说,ALB 的转发规则不会重写路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.