0

I have a service on foo.bar.com and I need to move it to foo.example.com. To give stragglers a chance to catch up I was hoping to put Caddy on on the server dealing with foo.bar.com and have it proxy for foo.example.com. Can't get even a basic example working like:

Caddyfile

:2015
reverse_proxy https://example.com
Jason Leach
  • 3,889
  • 7
  • 37
  • 54
  • in order to properly answer your question follow the instructions in the [previous answer](https://stackoverflow.com/a/65702973) and add the caddy version found using the `caddy version` command – fall simply Feb 05 '21 at 02:50

1 Answers1

0

This is correct example, You did not provided any debugging and any information about the error you are getting.

Caddy by default expects https if web configuration is either not IP or you explicitly tell this is http endpoint.

So it should work for you with curl https://localhost:2016/

Enable debugging and show us any error.

To increase verbosity put this on your Caddyfile

:2015 {
    log {
        level DEBUG
        output stdout
    }
    reverse_proxy https://example.com
Daniel Hornik
  • 1,957
  • 1
  • 14
  • 33