Nginx代理MinIO时出现“Access Denied“错误

MinIO与Nginx集成时,如果出现"Access Denied"错误,通常意味着Nginx代理的请求没有被正确地转发到MinIO服务。

出现错误:

xml 复制代码
<Error>
    <Code>AccessDenied</Code>
    <Message>Access Denied.</Message>
    <Key>test/1.jpg</Key>
    <BucketName>test1</BucketName>
    <Resource>/test1/test/1.jpg</Resource>
    <RequestId>17C8FCF0E2325480</RequestId>
    <HostId>1379dddc-2b73-49e7-b13d-a8a937600002</HostId>
</Error>

解决方法:

xml 复制代码
server {
    listen       80;
    server_name  localhost;
    
    location /桶命名/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_connect_timeout 300;    
        # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        chunked_transfer_encoding off;
		#MinIO访问地址
        proxy_pass http://localhost:9000;
    }
}
相关推荐
南境十里·墨染春水23 分钟前
linux学习进展 shell编程
linux·运维·学习
goyeer1 小时前
【ITIL4】32服务实践 - 问题管理(Problem Management)
linux·运维·服务器·企业数字化·it管理·itil·it治理
cen__y2 小时前
Linux11(网络编程)
linux·运维·服务器·c语言·网络·网络协议·tcp/ip
CableTech_SQH2 小时前
商业地产和高端酒店该怎么选综合布线解决方案?
运维·服务器·网络
xingyuzhisuan3 小时前
哪里可以一键部署Stable Diffusion XL的GPU云环境?(2026实测指南)
运维·人工智能·stable diffusion·gpu算力
Agent手记3 小时前
采购合同智能审核自动化,落地步骤与落地风险管控方案 —— 2026年企业级Agent深度实战指南
运维·人工智能·ai·自动化
Liangwei Lin3 小时前
LeetCode 22. 括号生成
linux·运维·服务器
( •̀∀•́ )9203 小时前
Linux 下部署 `social-auto-upload` 遇到的问题及完整解决方案
linux·运维·服务器
代码中介商3 小时前
Libevent实战:高性能网络编程指南
linux·运维·网络
徒劳爱学仙4 小时前
全志 V821 韦东山 Avaota-F1-B ubuntu开发环境搭建
linux·运维·ubuntu