xxx.com:12345 {
encode gzip zstd
handle /wjy/* { #反省代理请求 xxx.com:12345/wjy/xxxx 到 127.0.0.1:9999/wjy/xxxx
reverse_proxy 127.0.0.1:9999
}
handle_path /file/* { #将请求的/file/xxxxx 指向 /data/wjyfile/
root * /data/wjyfile/
file_server {
precompressed zstd br gzip
}
}
handle { #pwa 相关的
root * /data/wjy
try_files {path} /index.html
file_server {
precompressed zstd br gzip
}
}
}
标签:handle,虚拟目录,zstd,pwa,caddy,file,wjy,data
From: https://www.cnblogs.com/qbz95/p/17085408.html