2025年9月3日
1 分钟阅读
caddy 代理 minio静态页面的一些问题
caddy在使用reverse_proxy 代理到minio时,try_files会失效 返回minio的404页面

问题描述
caddy在使用reverse_proxy 代理到minio时,try_files会失效
返回minio的404页面
解决思路
使用handle_response拦截minio的返回,如果为404则尝试重定向到index.html
xxx.com {
rewrite * /buckets/{path}
reverse_proxy https://minio.website:9000 {
@404 status 404
handle_response @404 {
rewrite /* /buckets/index.html
reverse_proxy https://minio.website:9000
}
}
}
评论区 (0)
暂无评论,来发表第一条评论吧!