3 homepage: https://github.com/caddyserver/caddy
5 Caddy is a fast, multi-platform web server with automatic HTTPS.
14 Use the `@beta` tag for pre-releases, or `@x.y.z` for a specific version.
18 > Caddy makes it easy to use Let's Encrypt to handle HTTPS (TLS/SSL) and to
19 > reverse proxy APIs and WebSockets to other apps - such as those written node,
20 > Go, python, ruby, and PHP.
22 ### How to serve a directory
25 caddy file-server --browse --listen :4040
28 ### How to redirect and reverse proxy
30 Here's what a fairly basic `Caddyfile` looks like:
33 # redirect www to bare domain
35 redir https://example.com{uri} permanent
39 # log to stdout, which is captured by journalctl
45 # turn on standard streaming compression
48 # reverse proxy /api to :3000
49 reverse_proxy /api/* localhost:3000
51 # serve static files from public folder, but not /api
54 try_files {path} {path}/ {path}/index.html
59 rewrite @notApi {http.matchers.file.relative}
61 root * /srv/example.com/public/
66 And here's how you run caddy with it:
69 caddy run --config ./Caddyfile