2

I have created an ALB and a target group.

The ALB has a listener on 80. This forwards it to my target group which in turn sends it to a registered instance on port 9000.

I am trying to add a path based rule as follows:

enter image description here

However, when I am hitting <alb-dns-name>, I do get redirected to my registered instance.

When I try <alb-dns-name>/portainer I get 404.

Am I missing sth?

pkaramol
  • 16,451
  • 43
  • 149
  • 324
  • 3
    Have you checked the app path? Most likely your path mapping is incorrect. If you are getting 404 that means your webapp is responding. – Sid Malani Nov 20 '18 at 13:21
  • Where do I set the app path if I may ask? – pkaramol Nov 20 '18 at 13:25
  • The `/portainer` path btw does not exist in my application nowhere; I was just expecting that as soon as the ALB received the `/portainer` path, it would just simply redirected me to the tg; does the request convey the `/portainer` path to my target group instance? – pkaramol Nov 20 '18 at 13:27
  • It is a portainer (docker service) – pkaramol Nov 20 '18 at 13:30
  • Yes that I think is correct. Just try and add that to your app and test. – Sid Malani Nov 20 '18 at 13:30

1 Answers1

3

Path based routing also forwards the path to the respective request header;

So my app received /portainer in the request arriving to it and could not find/handle.

Switching to host based routing and the appropriate dns entries;

pkaramol
  • 16,451
  • 43
  • 149
  • 324