Web / Caddy Server Interview questions
What is a Caddyfile?
A Caddyfile is Caddy's native, human-friendly configuration format. Each site gets an address block, and directives inside that block describe what Caddy should do for requests to that address.
example.com { root * /var/www/html file_server }
In this snippet, example.com is the site address, root * sets the file root for all requests, and file_server tells Caddy to serve files from that root. When Caddy starts, it internally converts the Caddyfile into its native JSON structure through a config adapter, so anything expressible in Caddyfile is really just a shorthand for JSON.
More Related questions...