Rancher load balancer to static s3 site for only certain paths?

Let’s say I’m building a web application which I run using Rancher on a couple of serverns and I have a Rancher load balancer in front of, to which I’m currently pointing domain www.example.com to. This all works fine and dandy.

Now I want the root URL (www.example.com) to go to a static website hosted on S3 (a simple salesy “this is the product and these are the features you should totally sign up”-one pager), and all other routes to go to the web application. Since I don’t have the S3 site as a Rancher service I can’t (as far as I’m concerned) use the Rancer load balancer to route requests there?

Is there a way (that makes sense) to solve this? It feels like I’ll have a “oh right, I just need to do this simple thing!”-moment very soon, but until then I’ll just post this here.

Or maybe I can achieve this at the DNS layer? I would prefer to not need to redirect requests to another subdomain, but I suppose that’s my plan B (as cloudflare can do redirects based on requests).

The normal answer is subdomain (probably for the app, not the landing page website)… it is possible to proxy all requests for the website through the balancer and to an external host like S3, but defeats much of the point of hosting it on a CDN.

I also believe S3 requires pointing at a CNAME (vs an IP), which we don’t expose options for because the balancer must then be configured to decide how often to resolve that name and what to do if it fails, etc.

Thanks for the reply!

Yeah, it would be kind of stupid to require all requests to pass through the Rancher LB since that’s what we want to avoid by hosting the landing page on S3…

Basically we want www.ourapp.com to go to the landing page and www.ourapp.com/customers-page (handled by the webapp) to go to our customers pages, adding a subdomain to the webapp would basically mean bad UX for our users (in exchange for a more “proper” setup of infra, which our customers of course won’t care about at all). :slight_smile:

There is probably an easy solution which makes sense through both perspectives, I just need to do some more thinking about it I guess!