Url rewrite + reverse help

What is the correct way to merge uri replace and reverse_proxy rules?
My Caddyfile file looks like this:

{
     debug
}

http://linux.duke.edu {
     uri replace /metadata/repo/ /repo/OracleLinux/OL6/latest/archive/x86_64/ 1
     reverse_proxy https://yum.oracle.com
}

and run with:
caddy run -adapter caddyfile --config ./CaddyFile

I have the image error

Please fill out the help topic template, as per the forum rules.

Please don’t use screenshots when sharing errors, we can’t quote specific parts of the message when you do so.

See the docs about proxying over HTTPS:

Ha, I’m on a roadtrip with someone who is a huge Duke fan. @rogeriojlle Are you with/at Duke University?

Anyway, did Francis answer your question? It would really help if the template was filled out.

PS. If you named your config Caddyfile instead of CaddyFile you wouldn’t need to use --adapter caddyfile at all.

1 Like