Url rewrite + reverse help

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


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

I live in Brazil, I don’t know this university.
I put this url in the reverse proxy because it is quoted here https://vault.centos.org/6.10/os/x86_64/repodata/repomd.xml
And I thought that might be part of the problem he was trying to solve using Caddy.

Then why are you trying to use duke.edu as your domain? You must use a domain you own or control, not someone else’s.


Because I have no control over the content of yum.oracle.com or vault.centos.org, and this caddy server is not listening on a public ip.
I was just trying to get around a situation.
Anyway this was not the reason for my problem but a bug in curl which was resolved in Centos 6.10

I don’t understand. I don’t think this is really an explanation for what you were trying to do with that config.

Okay :man_shrugging: glad you figured out a solution anyways

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