caddy - setting https to localhost on mac

1.4k Views Asked by At

I am using caddy v2.3.0 on mac

If run caddy run i am getting following enter image description here

My Caddyfile

{
    local_certs
}

demoCart.dev:443 {
    reverse_proxy http://localhost:3000
}

If I run caddy validate it says Valid configuration

When I am trying to access it on the browser with https://democart.dev

enter image description here

1

There are 1 best solutions below

0
On

I may be wrong, but this looks like a DNS issue rather than a caddy issue.

Have you set up your DNS to point democart.dev to your machine? Caddy will only be able to serve it if it points to your machines IP address in the first place.

Try

localhost:443 {
    reverse_proxy http://localhost:3000
}

and see if that works.