Caddy is a powerful, extensible platform to serve your sites, services, and apps, written in Go. If you’re new to Caddy, the way you serve the Web is about to change.
Regularly Used Commands
caddy run
start caddy server (may load the Caddyfile in cwd)
caddy run --config /path/to/Caddyfile
caddy run --watch watch config file changes
caddy start - start caddy server and have it run in the background
caddy stop - stop the caddy process
caddy reload - for a graceful config change
caddy adapt - convert Caddyfile to json structure
The Caddyfile
With Compression
1
2
3
4
5
localhostencodezstdgziptemplatesfile_serverbrowse
Multiple Sites
1
2
3
4
5
6
7
8
9
10
:8080{respond"I am 8080"}:8081{respond"I am 8081"}:8082, :8083{respond"I am 808*"}