Tomcat as backend

1. Caddy version (caddy version):


2. How I run Caddy:

systemctl start caddy

a. System environment:

Debian 10

b. Command:

caddy reload

c. Service/unit/compose file:

paste full file contents here

d. My complete Caddyfile or JSON config: {
   rewrite / /app-backend
   reverse_proxy {

3. The problem I’m having:

i unable to browse domain, cause the backend url including “/app-backend”.
The full backend URL is

That’s why i have to use rewrite for now, but it shows “/app-backend”. I want to browse only.

How could i make it works?

Thank you.

You need to use * as your matcher, not /. Path matching in Caddy v2 is exact, so / means to only match exactly / and nothing else. Try this: {
   rewrite * /app-backend{uri}

If that doesn’t work, then your backend triggers redirects or serves responses with /app-backend in links and asset paths, then this approach won’t work, and you’ll need to make changes in your backend to accept requests at a different base path, without /app-backend.

Thanks @francislavoie for quick reply.

I tried as your recommend but it doesn’t work, it shows me “too many redirects”.
I guess this could be the case you mentioned, i don’t know how to make it to use without /app-backend

Axelor is backend app i am using.

This topic was automatically closed after 30 days. New replies are no longer allowed.