Reverse Proxy on caddy & Caddyfile on V2

I am trying to get the first project to work on Caddy.
I am able to successfully issue this command.
caddy reverse-proxy --from localhost:8080 --to localhost:8000

The next step is to try this using Caddyfile.

This is my Caddyfile:

reverse_proxy / {
to localhost:8000
health_path /health
health_status 200
transport http {
read_buffer 4096

I then run the commands:
caddy adapt --config ./Caddyfile to get the JSON format.
&& finally run
caddy start --config ./Mycaddy on the JSON.

I am getting this error ERROR http.log.error no upstreams available

Somehow I think that my Caddyfile is wrong.
Is this the right approach on V2?

It is now working.
It looks like i had to stop port :2019 first.
caddy stop --address

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