Caddy Server Static Website Config

If you want to deploy a static website with Caddy server, the Caddyfile is like following:

example.com www.example.com {
        root * /root/webroot/example.com
        file_server
        encode gzip
        log {
                #level ERROR
                 output file /root/caddy/example.com.log {
                         roll_size 0.1gb
                         roll_keep 2
                         roll_keep_for 48h
                 }
        }

}