Possible to Proxy to a sub folder?

Hi,

I am using Caddy version 0.9.1.

I am using the proxy method to successfully proxy a couple of domains at the moment.

I’d like to take this further if possible and proxy to a sub folder on a target server, is this possible to do?

This is an example that is working well for me without a sub folder:

support.domain.com:443 {
proxy / support.otherdomain.com {
proxy_header Host {host}
proxy_header X-Real-IP {remote}
proxy_header X-Custom-SSL “true”
}
}

Thank you for any guidance.

Try proxy / support.otherdomain.com/subfolder?

I tried that also. Sorry, I should have included that in my example.

I tried it and it just opens the root folder as if the /subfolder wasn’t there.

I don’t understand exactly what you mean by this then:

proxy to a sub folder on a target server

Don’t you just append the subfolder to the request then?

Did you try add the sub folder with a rewrite?

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