Load caddyflie error

caddy version is 2.7.0
my Caddyfile is {
root * /Users/go/caddy/file/
When I start using this file, it can run

curl -X POST localhost:2019/load -H “Content-Type: text/caddyfile” -d @Caddyfile

{“error”:“adapting config using caddyfile adapter: Caddyfile:1 - Syntax error: Unexpected token ‘file_server}’, expecting ‘}’, import chain: [‘’]”}

Please upgrade to latest.

The file might be malformed. Are you sure you’ve copied the file content as-is into here? Run caddy fmt in the directory and/or caddy validate.

1 Like

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