TypechoJoeTheme

个人技术分享

Caddy常用配置

http设置

http://wangxiaojiang.cn {
 gzip
 root  目录

http IP反代设置

echo ":80 {
 gzip
 proxy / http://wangxiaojiang.cn
}" > /usr/local/caddy/Caddyfile

http域名反代设置

echo "http://wangxiaojiang.cn {
 gzip
 proxy / http://www.baidu.com
}" > /usr/local/caddy/Caddyfile

https域名反向代理

echo "https://wangxiaojiang.cn {
 gzip
 tls /root/xxx.crt /root/xxx.key
 proxy / https://wangxiaojiang.cn
}" > /usr/local/caddy/Caddyfile
赞 · 0
评论 (0)