The Caddyfile is a text file that configures Caddy. It's designed to be easy to type and hard to get wrong.
The first line of the Caddyfile is always the address(es) of the site to serve.
You can define as many sites as you want; Caddy supports virtual hosting and lots of other features!
matt.life # Your site's address
ext .html # Clean URLs
errors error.log { # Error log
404 error-404.html # Custom error page
}
# PHP backend
fastcgi /blog localhost:9000 php
# API load balancer
proxy /api localhost:5001 localhost:5002
All you have to do is run caddy and voilà! Caddy automatically loads your Caddyfile if it's in the same folder. For production sites, HTTPS is on by default!
caddy
Activating privacy features... done.
http://matt.life
https://matt.life
_
Type your site's address to see it in action. Live sites are redirected to HTTPS for you.
Caddy is great for building sites at home or work, and for serving sites in production. Try it out!
Caddy and Let's Encrypt is pretty incredible. A 3-line config file yields a fully A-rated SSL site. Trivial! John Resig
Creator of jQuery
Link
Caddy is an amazing server project. Auto-HTTPS, GitHub integration, etc. ... Caddy is a perfect solution. ... Two thumbs up. I'm going to use it for all the things. Mike West
Link