Quic and HTTP3 by default
As of version 2.6, QUIC+HTTP3 is activated by default when running the Caddy server. The protocols can be tuned in the global options block:
|
|
Auto TLS certificates
No more managing Let’s encrypt certificates manually. Caddy does everything automatically from provisioning the certificates, to the renewing and revoking.
Built-in tooling
The Caddy binary comes with useful commands out of the box to do several tasks like:
- format the configuration file(caddyfile):
|
|
Validating the config file with
caddy validate
Generate hash passwords to be used in things like basic authentication, etc:
|
|
Dynamic templating
Caddy has a templating system that offers primitives to do things like: dynamically importing HTML pages, markdown rendering, JSON parsing, time and etc
PHP and FastCGI
We can render PHP files by passing it to the FastCGI server with:
|
|
Securing server/paths with basic auth
We can quickly add basic auth by generating the password has with caddy hash-password
and then adding the config to the server block with:
|
|
Reverse-proxying
Doing reverse proxy is as simple as:
|
|
Gotchas
- As far as I know, you can’t define global headers, they need to be defined inside a server block