简体   繁体   中英

path based routing for ecs service not work

基于路径的路由

I have an alb pointing to my ecs service registered to target-group-one. The DNS of the load balancer works fine and able to print the message from my simple apache webserver. 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.

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. The path rule that you configured only forwards the query to your target group (TG).

So if the rule matches www.example.com/gci , ALB will just forward the query to the associated TG. This means that your ECS service still must correctly respond to /gci path.

In other words, the forwarding rules of ALB do not re-write the paths.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM