Multiple proxies for same site

Hi! I’m using Caddy to revers proxy some sites on a DigitalOcean Ubuntu droplet.

This is my Caddy file, pretty simple :upside_down: {
  # projects
  proxy /projects/some-project localhost:8998

  # main site
  proxy / localhost:9000
} {
  proxy / localhost:8999 # main site
} and are working just fine.

But I’m getting a 404 when trying to access I’ve double checked and localhost:8998 works properly on DO. is a Harp.js app, it is catching all the 404 how it is expected, but /projects/some-project is showing the Caddy default 404 message.

Should I work like I expect? Am I missing something?

I posted the question also on StackOverflow.

1 Like

I don’t have any idea about your backend, but is it expecting the path to start with /projects/some-project? If not, you need to use this in your proxy directive to strip it:

without /projects/some-project

Thanks for the quick answer! That worked :smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.