When I write this syntax - everything is working:
localhost:8080 {
root /Users/root/workflow/site
}
if I write this syntax:
localhost:8080 {
root ~/workflow/site
}
I get 404 error.
Why not use an alias?
Because such a desire can appear not only for me. And this is not described in the docs and could complicate the search for errors.
Thanks for reading =)
Simple: ~ is a bash expansion, it has nothing to do with Caddy.
You could use {$HOME} instead, since this is how Caddy parses env variables in the Caddyfile, but it is not bash, so tilde won’t be replaced with your home folder.