Caddy 一个强大、Api Server, 一键Https, 反向代理服务器# Caddy 一个强大、Api Server, 一键Https, 反向代理服务器
官网: https://caddyserver.com/docs
Caddyfile
caddy start
https:localhost
或 http:localhost
http://localhost:2019
localhost { respond "Hello, world!" }
如下包括 encode zstd gzip
templates 可以解析html 模板内的一些语法
file_server 开启文件服务器
localhost { encode zstd gzip templates file_server browse }
localhost { encode zstd gzip templates file_server browse } localhost:8080 { respond /health-check 200 respond /hello "Hello, world! 8080" 200 } localhost:8081 { reverse_proxy https://localhost:8080 } http://localhost:8082 { reverse_proxy https://localhost:8080 } https://localhost:8083 { reverse_proxy https://localhost:8080 }
baidu.com { respond "Hello, world!" }
就是如此的 Easy
https://caddyserver.com/docs