Caddy web server
‘Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go’
From the Caddy website.
Maybe it also possible to (automatically) deploy faasd (OpenFaaS without Kubernetes) behind Caddy?
Caddy has an optional WebDAV module.[1]
Multiple domains in one caddyfile
See the official caddyfile documentation for more information.
example.com {
root /www/example.com
}
another.example {
root /www/another.example gzip log ../access.log
}
See https://caddy.community/t/multiple-domains/1761/8
Configuring Caddy through it’s REST API endpoints
https://caddyserver.com/docs/api
https://caddyserver.com/docs/api-tutorial
With the CLI or API you can replace the active config without downtime! OMG.
POST /load
Sets Caddy’s configuration, overriding any previous configuration. It blocks until the reload completes or fails. Configuration changes are lightweight, efficient, and incur zero downtime. If the new config fails for any reason, the old config is rolled back into place without downtime.
You can post new configs with content types text/caddyfile
or application/json5
.
https://caddyserver.com/docs/api#post-load
Netlify-style redirects in Caddy
Someone has already started a project to implement Netlify’s great _redirects
format for Caddy. https://github.com/samvaughton/caddy-netlify-redirects
netlify_redirects {
import /srv/_redirects
}
Reverse proxy for Docker containers via labels
The plugin scans Docker metadata, looking for labels indicating that the service or container should be served by Caddy.
Then, it generates an in-memory Caddyfile with site entries and proxies pointing to each Docker service by their DNS name or container IP.
Every time a docker object changes, the plugin updates the Caddyfile and triggers Caddy to gracefully reload, with zero-downtime.