Caddy will, by default, serve the current working directory on [http://localhost:8080](http://localhost:8080) (the default port will change before 1.0).
If the current directory has a file called `Caddyfile`, it will be loaded and parsed and used as configuration. To configure Caddy, place a Caddyfile in the directory of your site.
This simple file enables gzip compression, serves clean URLs (trying `.html` files under the hood), and adds the coveted "Access-Control-Allow-Origin: *" header to all requests starting with `/api`. Wow! Caddy can do a lot with just four lines.
| **log** | log *[what]**[output-file]**[format]* | Enables logging. Right now, only requests are logged. Default file is access.log. | `log requests /var/log/access.log "{time}: {method} for {url}"` |
| **rewrite** | rewrite *[from]**[to]* | Internally rewrites a request from one path to another. | `rewrite /a /b` |
| **redir** | redir *[from]**[to]**[status]* | HTTP redirect with the given status code. | `redir /a /b 302` |
| **ext** | ext *[extensions...]* | Serve clean URLs by internally adding extensions to the requests. Extensions will be tried in the order listed. | `ext .html .htm .txt` |
| **import** | import *[file]* | Gets replaced with the contents of another file. Useful for sharing settings. | `import shared/common.conf` |
| **header** | header *[path]**[header-name]**[header-value]* -or- header *[path]* { *[header-name]**[header-value]* ... } | Adds header(s) to responses of requests starting with the specified path. | `header / X-My-Header Foobar` |
| **tls** | tls *[cert-file]**[key-file]* | Serves the site over SSL (actually TLS) using the given certificate and key files. | `tls ../ssl/cert.pem ../ssl/key.pem` |
This should get you started tinkering. Better docs are on the way, but the spec is changing so quickly at this point that docs may lag behind development for now.
Please submit your ideas in an issue or you can drop a quick [tweet to @mholt6](https://twitter.com/mholt6). Pull requests that fix bugs are totally welcome, too. (Pull requests for new features should be discussed in an issue first.) Thanks for being involved!